ADD: jsdoc for wallet.addressIsChange

This commit is contained in:
Ivan Vershigora 2020-11-22 11:19:52 +03:00
parent 65725e3db8
commit 58cd65487f
2 changed files with 13 additions and 3 deletions

View file

@ -1036,7 +1036,12 @@ export class AbstractHDElectrumWallet extends AbstractHDWallet {
return ret;
}
// check if address is a Change address. Needed for Coin control
/**
* Check if address is a Change address. Needed for Coin control.
*
* @param address
* @returns {Boolean} Either address is a change or not
*/
addressIsChange(address) {
for (let c = 0; c < this.next_free_change_address_index + 1; c++) {
if (address === this._getInternalAddressByIndex(c)) return true;

View file

@ -419,8 +419,13 @@ export class LegacyWallet extends AbstractWallet {
return true;
}
// Check if address is a Change address. Needed for Coin control.
// Useless for Legacy wallets, so it is always false
/**
* Check if address is a Change address. Needed for Coin control.
* Useless for Legacy wallets, so it is always false
*
* @param address
* @returns {Boolean} Either address is a change or not
*/
addressIsChange(address) {
return false;
}