Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b47975c

Browse files
authoredNov 25, 2022
Fix wallet creation bug
1 parent 7fd007c commit b47975c

File tree

1 file changed

+10
-22
lines changed

1 file changed

+10
-22
lines changed
 

‎screens/Create.tsx

+10-22
Original file line numberDiff line numberDiff line change
@@ -59,28 +59,16 @@ export default function Create({ navigation }: RootStackScreenProps<'Create'>) {
5959
}
6060
try {
6161
setCreating(true)
62-
if (chain) {
63-
const wallet = await WalletFactory.createWalletFromMnemonic(chain, {
64-
networkType,
65-
accountId,
66-
mnemonic,
67-
})
68-
69-
dispatch({
70-
type: 'wallet/add',
71-
payload: { ...wallet, publicKey: undefined },
72-
})
73-
} else {
74-
const nWallet = await WalletFactory.createWalletFromMnemonic(chain, {
75-
networkType,
76-
accountId,
77-
mnemonic,
78-
})
79-
dispatch({
80-
type: 'wallet/add',
81-
payload: nWallet,
82-
})
83-
}
62+
const nWallet = await WalletFactory.createWalletFromMnemonic(chain, {
63+
networkType,
64+
accountId,
65+
mnemonic,
66+
})
67+
dispatch({
68+
type: 'wallet/add',
69+
payload: nWallet,
70+
})
71+
8472
setCreating(false)
8573
if (pincode) {
8674
navigation.dispatch(StackActions.popToTop())

0 commit comments

Comments
 (0)
Please sign in to comment.