1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-23 06:21:06 +00:00
trezor-wallet/src/actions/AccountsActions.js
2018-12-21 10:58:53 +01:00

19 lines
456 B
JavaScript

/* @flow */
import * as ACCOUNT from 'actions/constants/account';
import type { Action } from 'flowtype';
import type { Account, State } from 'reducers/AccountsReducer';
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,
payload: account,
});