diff --git a/react/src/actions/actions/electrum.js b/react/src/actions/actions/electrum.js index 312b4fcbb..915eede75 100644 --- a/react/src/actions/actions/electrum.js +++ b/react/src/actions/actions/electrum.js @@ -313,7 +313,7 @@ export function shepherdElectrumListunspent(coin, address) { }); } -export function shepherdElectrumBip39Keys(seed, match) { +export function shepherdElectrumBip39Keys(seed, match, addressdepth, accounts) { return new Promise((resolve, reject) => { fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/seed/bip39/match`, { method: 'POST', @@ -323,6 +323,8 @@ export function shepherdElectrumBip39Keys(seed, match) { body: JSON.stringify({ seed, match, + addressdepth, + accounts, }), }) .catch((error) => { diff --git a/react/src/components/dashboard/settings/settings.bip39KeysPanel.js b/react/src/components/dashboard/settings/settings.bip39KeysPanel.js index 756a5d560..7190a8d14 100644 --- a/react/src/components/dashboard/settings/settings.bip39KeysPanel.js +++ b/react/src/components/dashboard/settings/settings.bip39KeysPanel.js @@ -17,6 +17,8 @@ class Bip39KeysPanel extends React.Component { passphrase: '', seedInputVisibility: false, trimPassphraseTimer: null, + addressdepth: 20, + accounts: 1, }; this._getBip39Keys = this._getBip39Keys.bind(this); this.updateInput = this.updateInput.bind(this); @@ -35,6 +37,9 @@ class Bip39KeysPanel extends React.Component { passphrase: '', keys: null, match: null, + accounts: 1, + addressdepth: 20, + seedInputVisibility: false, })); } } @@ -86,8 +91,12 @@ class Bip39KeysPanel extends React.Component { } _getBip39Keys() { - shepherdElectrumBip39Keys(this.state.passphrase, this.state.match) - .then((res) => { + shepherdElectrumBip39Keys( + this.state.passphrase, + this.state.match, + this.state.addressdepth, + this.state.accounts + ).then((res) => { this.setState({ keys: res.result.priv ? res.result : 'empty', }); @@ -110,7 +119,7 @@ class Bip39KeysPanel extends React.Component {