mirror of
https://github.com/tornadocash/tornado-classic-ui
synced 2024-02-02 15:04:09 +01:00
20 lines
421 B
JavaScript
20 lines
421 B
JavaScript
export function saveAccount({ dispatch, rootState }, { account, address, backup }) {
|
|
const { ethAccount } = rootState.metamask
|
|
|
|
dispatch('createMutation', {
|
|
type: 'SET_ENCRYPTED_ACCOUNT',
|
|
payload: account
|
|
})
|
|
|
|
dispatch('createMutation', {
|
|
type: 'SET_ADDRESSES',
|
|
payload: {
|
|
addresses: {
|
|
encrypt: address,
|
|
backup: backup || '-',
|
|
connect: ethAccount
|
|
}
|
|
}
|
|
})
|
|
}
|