diff --git a/src/main/js/wallet/MoneroWalletRpc.js b/src/main/js/wallet/MoneroWalletRpc.js index 58e9d1a33..b1ff22097 100644 --- a/src/main/js/wallet/MoneroWalletRpc.js +++ b/src/main/js/wallet/MoneroWalletRpc.js @@ -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) { diff --git a/src/main/js/wallet/model/MoneroWalletConfig.js b/src/main/js/wallet/model/MoneroWalletConfig.js index c7d838087..1a25aabd2 100644 --- a/src/main/js/wallet/model/MoneroWalletConfig.js +++ b/src/main/js/wallet/model/MoneroWalletConfig.js @@ -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; } }