Skip to content

Commit

Permalink
fix wallet backup does not show mnemonic (#757)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoncalves authored Sep 29, 2023
1 parent af88d2e commit d521f4f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/screens/info/ShowMnemonicScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
settingsStackRouteNames,
} from 'navigation/settingsNavigator/types'
import { headerLeftOption } from 'navigation/profileNavigator'
import { getCurrentChainId } from 'src/storage/ChainStorage'

export enum TestID {
Mnemonic = 'Mnemonic.Text',
Expand All @@ -31,7 +32,10 @@ export const ShowMnemonicScreen = ({
const fn = async () => {
const keys = await getKeys()
if (keys) {
const { kms } = KeyManagementSystem.fromSerialized(keys)
const { kms } = KeyManagementSystem.fromSerialized(
keys,
getCurrentChainId(),
)
setMnemonic(kms.mnemonic)
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/screens/settings/WalletBackup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
import { castStyle } from 'shared/utils'
import { getKeys } from 'storage/SecureStorage'
import { DeleteWalletModal } from 'components/modal/deleteWalletModal'
import { getCurrentChainId } from 'src/storage/ChainStorage'

type Props = SettingsScreenProps<settingsStackRouteNames.WalletBackup>

Expand All @@ -33,7 +34,10 @@ export const WalletBackup = (_: Props) => {
const fn = async () => {
const keys = await getKeys()
if (keys) {
const { kms } = KeyManagementSystem.fromSerialized(keys)
const { kms } = KeyManagementSystem.fromSerialized(
keys,
getCurrentChainId(),
)
setMnemonic(kms.mnemonic)
}
}
Expand Down

0 comments on commit d521f4f

Please sign in to comment.