mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 12:44:31 +00:00
fix address generation index bug
This commit is contained in:
parent
bfc71dee67
commit
7ddf212091
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ abstract class Bip39HDWallet<T extends Bip39HDCurrency> extends Bip39Wallet<T>
|
|||
@override
|
||||
Future<void> generateNewReceivingAddress() async {
|
||||
final current = await getCurrentReceivingAddress();
|
||||
final index = current?.derivationIndex ?? 0;
|
||||
final index = current == null ? 0 : current.derivationIndex + 1;
|
||||
const chain = 0; // receiving address
|
||||
|
||||
final address = await _generateAddress(
|
||||
|
@ -49,7 +49,7 @@ abstract class Bip39HDWallet<T extends Bip39HDCurrency> extends Bip39Wallet<T>
|
|||
@override
|
||||
Future<void> generateNewChangeAddress() async {
|
||||
final current = await getCurrentChangeAddress();
|
||||
final index = current?.derivationIndex ?? 0;
|
||||
final index = current == null ? 0 : current.derivationIndex + 1;
|
||||
const chain = 1; // change address
|
||||
|
||||
final address = await _generateAddress(
|
||||
|
|
Loading…
Reference in a new issue