Skip to content

Commit

Permalink
Do not set wallet selection to undefined when adding a new wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Sep 2, 2022
1 parent 70d1fcb commit 52dde69
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/state/wallet/saga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { hex2uint, parseRpcBalance, publicKeyToAddress, shortPublicKey, uint2hex
import nacl from 'tweetnacl'
import { call, fork, put, select, take, takeEvery, takeLatest } from 'typed-redux-saga'

import { walletActions, initialState } from '.'
import { walletActions } from '.'
import { LedgerAccount } from '../ledger/types'
import { getOasisNic } from '../network/saga'
import { transactionActions } from '../transaction'
Expand Down Expand Up @@ -130,7 +130,6 @@ export function* openWalletFromMnemonic({ payload: mnemonic }: PayloadAction<str
* If it has "selectImmediately", we select it immediately
*/
export function* addWallet({ payload: newWallet }: PayloadAction<AddWalletPayload>) {
yield* put(walletActions.walletSelected(initialState.selectedWallet))
const existingWallet = yield* call(getWalletByAddress, newWallet.address)
if (!existingWallet) {
yield* put(walletActions.walletOpened(newWallet))
Expand Down

0 comments on commit 52dde69

Please sign in to comment.