Skip to content

Commit 7094816

Browse files
committed
Make the split operation sequential
1 parent 42ef11e commit 7094816

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/scenes/CreateWalletSelectFiatScene.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,16 @@ const CreateWalletSelectFiatComponent = (props: Props) => {
103103

104104
const handleSplit = useHandler(async () => {
105105
if (splitSourceWalletId != null) {
106-
newWalletItems.forEach(async item => {
106+
for (const item of newWalletItems) {
107107
try {
108108
const splitWalletId = await account.splitWalletInfo(splitSourceWalletId, account.currencyConfig[item.pluginId]?.currencyInfo.walletType)
109109
const splitWallet = await account.waitForCurrencyWallet(splitWalletId)
110110
await splitWallet.renameWallet(walletNames[item.key])
111111
} catch (error: unknown) {
112112
showError(error)
113+
break
113114
}
114-
})
115+
}
115116
navigation.navigate('walletsTab', { screen: 'walletList' })
116117
}
117118
})

0 commit comments

Comments
 (0)