diff --git a/package.json b/package.json index 83e5683b179..edc12549273 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@onekeyfe/hd-web-sdk": "0.3.27", "@rabby-wallet/eth-coinbase-keyring": "0.0.0-beta.8", "@rabby-wallet/eth-gnosis-keyring": "0.0.1", - "@rabby-wallet/eth-hd-keyring": "4.3.1", + "@rabby-wallet/eth-hd-keyring": "4.3.2", "@rabby-wallet/eth-lattice-keyring": "1.1.1", "@rabby-wallet/eth-simple-keyring": "5.0.1", "@rabby-wallet/eth-trezor-keyring": "2.5.1", diff --git a/src/background/controller/wallet.ts b/src/background/controller/wallet.ts index bb11efebbb4..1d61214ec28 100644 --- a/src/background/controller/wallet.ts +++ b/src/background/controller/wallet.ts @@ -2426,8 +2426,8 @@ export class WalletController extends BaseController { return result; }; - slip39DecodeMnemonics = (secretShares: string[]) => { - return HdKeyring.slip39DecodeMnemonics(secretShares); + slip39GetThreshold = (secretShares: string[]) => { + return HdKeyring.slip39GetThreshold(secretShares); }; slip39DecodeMnemonic = (secretShare: string) => { diff --git a/src/ui/views/ImportMnemonics/InputMnemonics.tsx b/src/ui/views/ImportMnemonics/InputMnemonics.tsx index 4ce10dc0b28..a52cf4bf1a9 100644 --- a/src/ui/views/ImportMnemonics/InputMnemonics.tsx +++ b/src/ui/views/ImportMnemonics/InputMnemonics.tsx @@ -169,13 +169,13 @@ const ImportMnemonics = () => { setSecretShares(_secretShares); try { - const result = await wallet.slip39DecodeMnemonics(_secretShares); - setSlip39GroupNumber(result.groupThreshold); + const groupThreshold = await wallet.slip39GetThreshold(_secretShares); + setSlip39GroupNumber(groupThreshold); form.setFieldsValue({ - mnemonics: _secretShares.slice(0, result.groupThreshold).join('\n'), + mnemonics: _secretShares.slice(0, groupThreshold).join('\n'), }); } catch (err) { - console.log('slip39DecodeMnemonics error', err); + console.log('slip39GetThreshold error', err); } }, [isSlip39] diff --git a/yarn.lock b/yarn.lock index 20ac3b12384..501e79a17e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4496,10 +4496,10 @@ events "^3.3.0" web3-utils "^1.6.1" -"@rabby-wallet/eth-hd-keyring@4.3.1": - version "4.3.1" - resolved "https://registry.yarnpkg.com/@rabby-wallet/eth-hd-keyring/-/eth-hd-keyring-4.3.1.tgz#3936b463c652a4d212c5753117631477f636667a" - integrity sha512-mLPkjEJucyPxLIhy3RrEGteaMCFtLytG4Er3aowekOJZol/K4PzuAvmiwYFUE5SWwO+tQwO1e9VPeNYSlpSvPg== +"@rabby-wallet/eth-hd-keyring@4.3.2": + version "4.3.2" + resolved "https://registry.yarnpkg.com/@rabby-wallet/eth-hd-keyring/-/eth-hd-keyring-4.3.2.tgz#98160000cd956bf2b6c781924fdcd687cd87df25" + integrity sha512-22SPkkdthbZs8akFhAbCeVeH3QEuEAD7EIy1s7R+YkA4WrwRT6w+Ou5oHYehiD8Ysquuv9GtDlZIq8n9jPH3HA== dependencies: "@ethereumjs/util" "^9.0.0" "@metamask/eth-sig-util" "^4.0.0"