diff options
author | Fabio Berger <me@fabioberger.com> | 2017-12-18 08:38:59 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-12-18 08:38:59 +0800 |
commit | 449fd9f0242b031c7427ae9a95430008c3171d1c (patch) | |
tree | 3c3c74b70bffa766be0bd6ef29c5bf095fdf4ce0 /packages/website/ts | |
parent | 22c4ee6ef709610155191c4b0629ba0c41ce908f (diff) | |
download | dexon-sol-tools-449fd9f0242b031c7427ae9a95430008c3171d1c.tar dexon-sol-tools-449fd9f0242b031c7427ae9a95430008c3171d1c.tar.gz dexon-sol-tools-449fd9f0242b031c7427ae9a95430008c3171d1c.tar.bz2 dexon-sol-tools-449fd9f0242b031c7427ae9a95430008c3171d1c.tar.lz dexon-sol-tools-449fd9f0242b031c7427ae9a95430008c3171d1c.tar.xz dexon-sol-tools-449fd9f0242b031c7427ae9a95430008c3171d1c.tar.zst dexon-sol-tools-449fd9f0242b031c7427ae9a95430008c3171d1c.zip |
Remove unused enums
Diffstat (limited to 'packages/website/ts')
-rw-r--r-- | packages/website/ts/redux/dispatcher.ts | 7 | ||||
-rw-r--r-- | packages/website/ts/redux/reducer.ts | 17 | ||||
-rw-r--r-- | packages/website/ts/types.ts | 15 |
3 files changed, 0 insertions, 39 deletions
diff --git a/packages/website/ts/redux/dispatcher.ts b/packages/website/ts/redux/dispatcher.ts index cbcee6599..e37e1fa6c 100644 --- a/packages/website/ts/redux/dispatcher.ts +++ b/packages/website/ts/redux/dispatcher.ts @@ -5,7 +5,6 @@ import { ActionTypes, AssetToken, BlockchainErrs, - Direction, Order, ProviderType, ScreenWidths, @@ -43,12 +42,6 @@ export class Dispatcher { type: ActionTypes.SWAP_ASSET_TOKENS, }); } - public updateGenerateOrderStep(direction: Direction) { - this.dispatch({ - data: direction, - type: ActionTypes.UPDATE_GENERATE_ORDER_STEP, - }); - } public updateOrderSalt(salt: BigNumber) { this.dispatch({ data: salt, diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts index 9bd8899ad..361e5f8c6 100644 --- a/packages/website/ts/redux/reducer.ts +++ b/packages/website/ts/redux/reducer.ts @@ -5,8 +5,6 @@ import { Action, ActionTypes, BlockchainErrs, - Direction, - GenerateOrderSteps, Order, ProviderType, ScreenWidths, @@ -28,7 +26,6 @@ export interface State { // Portal blockchainErr: BlockchainErrs; blockchainIsLoaded: boolean; - generateOrderStep: GenerateOrderSteps; networkId: number; orderExpiryTimestamp: BigNumber; orderFillAmount: BigNumber; @@ -60,7 +57,6 @@ const INITIAL_STATE: State = { // Portal blockchainErr: BlockchainErrs.NoError, blockchainIsLoaded: false, - generateOrderStep: GenerateOrderSteps.ChooseAssets, networkId: undefined, orderExpiryTimestamp: utils.initialOrderExpiryUnixTimestampSec(), orderFillAmount: undefined, @@ -259,19 +255,6 @@ export function reducer(state: State = INITIAL_STATE, action: Action) { }); } - case ActionTypes.UPDATE_GENERATE_ORDER_STEP: { - const direction = action.data; - let nextGenerateOrderStep = state.generateOrderStep; - if (direction === Direction.forward) { - nextGenerateOrderStep += 1; - } else if (state.generateOrderStep !== 0) { - nextGenerateOrderStep -= 1; - } - return _.assign({}, state, { - generateOrderStep: nextGenerateOrderStep, - }); - } - case ActionTypes.UPDATE_CHOSEN_ASSET_TOKEN: { const newSideToAssetToken = _.assign({}, state.sideToAssetToken, { [action.data.side]: action.data.token, diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index 085b46789..52d30ae35 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -10,25 +10,11 @@ function strEnum(values: string[]): {[key: string]: string} { }, Object.create(null)); } -export enum GenerateOrderSteps { - ChooseAssets, - GrantAllowance, - RemainingConfigs, - SignTransaction, - CopyAndShare, -} - export enum Side { Receive = 'RECEIVE', Deposit = 'DEPOSIT', } -export const Direction = strEnum([ - 'forward', - 'backward', -]); -export type Direction = keyof typeof Direction; - export interface Token { iconUrl?: string; name: string; @@ -141,7 +127,6 @@ export const ActionTypes = strEnum([ 'CLEAR_TOKEN_BY_ADDRESS', 'UPDATE_BLOCKCHAIN_IS_LOADED', 'UPDATE_NETWORK_ID', - 'UPDATE_GENERATE_ORDER_STEP', 'UPDATE_CHOSEN_ASSET_TOKEN', 'UPDATE_CHOSEN_ASSET_TOKEN_ADDRESS', 'UPDATE_ORDER_TAKER_ADDRESS', |