mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-23 06:21:06 +00:00
19 lines
456 B
JavaScript
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,
|
|
});
|