Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Commit 1acb27d

Browse files
committed
solution: fix error with incorrect blockchain for tokens
1 parent d9c7878 commit 1acb27d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/store/src/accounts/sagas.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,6 @@ function* createHdAddress(vault: IEmeraldVault, action: ICreateHdEntry): SagaIte
207207

208208
const tokenRegistry = new TokenRegistry(action.tokens);
209209

210-
const tokens = tokenRegistry.byBlockchain(blockchain);
211-
212210
if (blockchain === BlockchainCode.ETC || blockchain === BlockchainCode.ETH) {
213211
const shadowBlockchain = blockchain === BlockchainCode.ETH ? BlockchainCode.ETC : BlockchainCode.ETH;
214212

@@ -230,6 +228,8 @@ function* createHdAddress(vault: IEmeraldVault, action: ICreateHdEntry): SagaIte
230228

231229
ipcRenderer.send(IpcCommands.BALANCE_SUBSCRIBE, shadowBlockchain, shadowEntryId, [shadowAddress]);
232230

231+
const tokens = tokenRegistry.byBlockchain(shadowBlockchain);
232+
233233
yield put(requestTokensBalances(shadowBlockchain, tokens, shadowAddress));
234234
yield put(hdAccountCreated(walletId, shadowEntry));
235235
}
@@ -239,6 +239,8 @@ function* createHdAddress(vault: IEmeraldVault, action: ICreateHdEntry): SagaIte
239239

240240
ipcRenderer.send(IpcCommands.BALANCE_SUBSCRIBE, blockchain, entry.id, [entryAddress]);
241241

242+
const tokens = tokenRegistry.byBlockchain(blockchain);
243+
242244
yield put(requestTokensBalances(blockchain, tokens, entryAddress));
243245
yield put(hdAccountCreated(walletId, entry));
244246

0 commit comments

Comments
 (0)