receiveAddress property

Address receiveAddress

For HD wallets get next Account.reserveAddress. Otherwise loop nextAddressIndex.

Implementation

Address get receiveAddress {
  if (hdWallet) {
    if (account.reserveAddress.isNotEmpty) {
      return account.reserveAddress.entries.first.value;
    } else {
      return null;
    }
  } else {
    if (addresses.isEmpty) return null;
    nextAddressIndex = ((nextAddressIndex ?? -1) + 1) % addresses.length;
    return addresses.values.toList()[nextAddressIndex];
  }
}