Skip to content

Commit

Permalink
fix: update deposit address when the main account id is updated (#8142)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpl121 authored Mar 6, 2024
1 parent 1e2c1f7 commit bf03f93
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
import { MenuItem, Modal } from '@ui'
import { localize } from '@core/i18n'
import { Icon } from '@auxiliary/icon/enums'
import { updateActiveWalletPersistedData } from '@core/profile'
import { selectedWallet, selectedWalletId } from '@core/wallet'
import { updateActiveWallet, updateActiveWalletPersistedData } from '@core/profile'
import { getBech32AddressFromAddressTypes, selectedWallet, selectedWalletId } from '@core/wallet'
import { openPopup, PopupId } from '@auxiliary/popup'
import { AccountAddress } from '@iota/sdk/out/types'
export let modal: Modal = undefined
export let accountId: string
Expand All @@ -14,6 +15,9 @@
updateActiveWalletPersistedData($selectedWalletId, {
mainAccountId: accountId,
})
updateActiveWallet($selectedWalletId, {
depositAddress: getBech32AddressFromAddressTypes(new AccountAddress(accountId)),
})
modal?.close()
}
Expand Down

0 comments on commit bf03f93

Please sign in to comment.