You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-wallet/src/js/actions/WalletActions.js

31 lines
646 B

/* @flow */
'use strict';
import * as WALLET from './constants/wallet';
import type { RouterLocationState } from '../flowtype';
export type WalletAction = {
type: typeof WALLET.SET_INITIAL_URL,
state?: RouterLocationState,
pathname?: string
} | {
type: typeof WALLET.TOGGLE_DEVICE_DROPDOWN,
opened: boolean
} | {
type: typeof WALLET.ON_BEFORE_UNLOAD
}
export const onBeforeUnload = (): WalletAction => {
return {
type: WALLET.ON_BEFORE_UNLOAD
}
}
export const toggleDeviceDropdown = (opened: boolean): WalletAction => {
return {
type: WALLET.TOGGLE_DEVICE_DROPDOWN,
opened
}
}