Skip to content

Commit

Permalink
fix subaddress lookahead
Browse files Browse the repository at this point in the history
  • Loading branch information
woodser committed Jan 4, 2023
1 parent 9f4bda9 commit 2ee7899
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/main/js/wallet/MoneroWalletRpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ class MoneroWalletRpc extends MoneroWallet {
throw new MoneroError("Wallet may be initialized with a mnemonic or keys but not both");
}
if (config.getNetworkType() !== undefined) throw new MoneroError("Cannot provide networkType when creating RPC wallet because server's network type is already set");
if (config.getAccountLookahead() !== undefined || config.getSubaddressLookahead() !== undefined) throw new MoneroError("monero-wallet-rpc does not support creating wallets with subaddress lookahead over rpc");

// create wallet
if (config.getMnemonic() !== undefined) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/js/wallet/model/MoneroWalletConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,20 +241,20 @@ class MoneroWalletConfig {
}

getAccountLookahead() {
return this.state.accountLookahead;
return this.config.accountLookahead;
}

setAccountLookahead(accountLookahead) {
this.state.accountLookahead = accountLookahead;
this.config.accountLookahead = accountLookahead;
return this;
}

getSubaddressLookahead() {
return this.state.subaddressLookahead;
return this.config.subaddressLookahead;
}

setSubaddressLookahead(subaddressLookahead) {
this.state.subaddressLookahead = subaddressLookahead;
this.config.subaddressLookahead = subaddressLookahead;
return this;
}
}
Expand Down

0 comments on commit 2ee7899

Please sign in to comment.