mirror of https://github.com/trezor/trezor-wallet
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.
31 lines
646 B
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
|
|
}
|
|
}
|