1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-02-02 11:21:11 +00:00
trezor-wallet/src/actions/AccountsActions.js

19 lines
456 B
JavaScript
Raw Normal View History

2018-04-16 21:19:50 +00:00
/* @flow */
2018-08-14 13:18:16 +00:00
import * as ACCOUNT from 'actions/constants/account';
2018-09-23 06:49:43 +00:00
import type { Action } from 'flowtype';
import type { Account, State } from 'reducers/AccountsReducer';
2018-04-16 21:19:50 +00:00
export type AccountAction = {
type: typeof ACCOUNT.FROM_STORAGE,
2018-04-23 10:20:15 +00:00
payload: State
} | {
type: typeof ACCOUNT.CREATE | typeof ACCOUNT.UPDATE,
payload: Account,
};
export const update = (account: Account): Action => ({
type: ACCOUNT.UPDATE,
2018-09-23 06:49:43 +00:00
payload: account,
});