1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-12 11:28:56 +00:00
trezor-wallet/src/actions/AccountsActions.js

21 lines
503 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
2019-03-04 12:33:02 +00:00
export type AccountAction =
| {
type: typeof ACCOUNT.FROM_STORAGE,
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,
});