2017-09-24 19:06:28 -07:00
|
|
|
import * as interfaces from './actionTypes';
|
|
|
|
import { TypeKeys } from './constants';
|
|
|
|
|
2017-10-10 22:04:49 -07:00
|
|
|
export type TForceOfflineConfig = typeof forceOfflineConfig;
|
|
|
|
export function forceOfflineConfig(): interfaces.ForceOfflineAction {
|
|
|
|
return {
|
|
|
|
type: TypeKeys.CONFIG_FORCE_OFFLINE
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export type TToggleOfflineConfig = typeof toggleOfflineConfig;
|
|
|
|
export function toggleOfflineConfig(): interfaces.ToggleOfflineAction {
|
|
|
|
return {
|
|
|
|
type: TypeKeys.CONFIG_TOGGLE_OFFLINE
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-09-24 19:06:28 -07:00
|
|
|
export type TChangeLanguage = typeof changeLanguage;
|
|
|
|
export function changeLanguage(sign: string): interfaces.ChangeLanguageAction {
|
|
|
|
return {
|
|
|
|
type: TypeKeys.CONFIG_LANGUAGE_CHANGE,
|
2017-10-10 22:04:49 -07:00
|
|
|
payload: sign
|
2017-09-24 19:06:28 -07:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export type TChangeNode = typeof changeNode;
|
|
|
|
export function changeNode(value: string): interfaces.ChangeNodeAction {
|
|
|
|
return {
|
|
|
|
type: TypeKeys.CONFIG_NODE_CHANGE,
|
2017-10-10 22:04:49 -07:00
|
|
|
payload: value
|
2017-09-24 19:06:28 -07:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export type TChangeGasPrice = typeof changeGasPrice;
|
|
|
|
export function changeGasPrice(value: number): interfaces.ChangeGasPriceAction {
|
|
|
|
return {
|
|
|
|
type: TypeKeys.CONFIG_GAS_PRICE,
|
2017-10-10 22:04:49 -07:00
|
|
|
payload: value
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export type TPollOfflineStatus = typeof pollOfflineStatus;
|
|
|
|
export function pollOfflineStatus(): interfaces.PollOfflineStatus {
|
|
|
|
return {
|
|
|
|
type: TypeKeys.CONFIG_POLL_OFFLINE_STATUS
|
2017-09-24 19:06:28 -07:00
|
|
|
};
|
|
|
|
}
|
2017-10-03 21:37:06 -07:00
|
|
|
|
|
|
|
export type TChangeNodeIntent = typeof changeNodeIntent;
|
|
|
|
export function changeNodeIntent(
|
|
|
|
payload: string
|
|
|
|
): interfaces.ChangeNodeIntentAction {
|
|
|
|
return {
|
|
|
|
type: TypeKeys.CONFIG_NODE_CHANGE_INTENT,
|
|
|
|
payload
|
|
|
|
};
|
|
|
|
}
|
2017-11-09 22:30:20 -05:00
|
|
|
|
|
|
|
export type TWeb3UnsetNode = typeof web3UnsetNode;
|
|
|
|
export function web3UnsetNode(): interfaces.Web3UnsetNodeAction {
|
|
|
|
return {
|
|
|
|
type: TypeKeys.CONFIG_NODE_WEB3_UNSET
|
|
|
|
};
|
|
|
|
}
|