aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/redux/dispatcher.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-12-18 09:06:49 +0800
committerFabio Berger <me@fabioberger.com>2017-12-18 09:06:49 +0800
commit90d274ffc4cce36c1ff572fad10bd7896e255ada (patch)
tree0441207f95f6028d8ab692d67cc67e56b87d7171 /packages/website/ts/redux/dispatcher.ts
parent449fd9f0242b031c7427ae9a95430008c3171d1c (diff)
downloaddexon-0x-contracts-90d274ffc4cce36c1ff572fad10bd7896e255ada.tar
dexon-0x-contracts-90d274ffc4cce36c1ff572fad10bd7896e255ada.tar.gz
dexon-0x-contracts-90d274ffc4cce36c1ff572fad10bd7896e255ada.tar.bz2
dexon-0x-contracts-90d274ffc4cce36c1ff572fad10bd7896e255ada.tar.lz
dexon-0x-contracts-90d274ffc4cce36c1ff572fad10bd7896e255ada.tar.xz
dexon-0x-contracts-90d274ffc4cce36c1ff572fad10bd7896e255ada.tar.zst
dexon-0x-contracts-90d274ffc4cce36c1ff572fad10bd7896e255ada.zip
Update ActionType enum and move from using _.assign in reducer
Diffstat (limited to 'packages/website/ts/redux/dispatcher.ts')
-rw-r--r--packages/website/ts/redux/dispatcher.ts66
1 files changed, 33 insertions, 33 deletions
diff --git a/packages/website/ts/redux/dispatcher.ts b/packages/website/ts/redux/dispatcher.ts
index e37e1fa6c..ad5553c58 100644
--- a/packages/website/ts/redux/dispatcher.ts
+++ b/packages/website/ts/redux/dispatcher.ts
@@ -22,42 +22,42 @@ export class Dispatcher {
// Portal
public resetState() {
this.dispatch({
- type: ActionTypes.RESET_STATE,
+ type: ActionTypes.ResetState,
});
}
public updateNodeVersion(nodeVersion: string) {
this.dispatch({
data: nodeVersion,
- type: ActionTypes.UPDATE_NODE_VERSION,
+ type: ActionTypes.UpdateNodeVersion,
});
}
public updateScreenWidth(screenWidth: ScreenWidths) {
this.dispatch({
data: screenWidth,
- type: ActionTypes.UPDATE_SCREEN_WIDTH,
+ type: ActionTypes.UpdateScreenWidth,
});
}
public swapAssetTokenSymbols() {
this.dispatch({
- type: ActionTypes.SWAP_ASSET_TOKENS,
+ type: ActionTypes.SwapAssetTokens,
});
}
public updateOrderSalt(salt: BigNumber) {
this.dispatch({
data: salt,
- type: ActionTypes.UPDATE_ORDER_SALT,
+ type: ActionTypes.UpdateOrderSalt,
});
}
public updateUserSuppliedOrderCache(order: Order) {
this.dispatch({
data: order,
- type: ActionTypes.UPDATE_USER_SUPPLIED_ORDER_CACHE,
+ type: ActionTypes.UpdateUserSuppliedOrderCache,
});
}
public updateShouldBlockchainErrDialogBeOpen(shouldBeOpen: boolean) {
this.dispatch({
data: shouldBeOpen,
- type: ActionTypes.UPDATE_SHOULD_BLOCKCHAIN_ERR_DIALOG_BE_OPEN,
+ type: ActionTypes.UpdateShouldBlockchainErrDialogBeOpen,
});
}
public updateChosenAssetToken(side: Side, token: AssetToken) {
@@ -66,7 +66,7 @@ export class Dispatcher {
side,
token,
},
- type: ActionTypes.UPDATE_CHOSEN_ASSET_TOKEN,
+ type: ActionTypes.UpdateChosenAssetToken,
});
}
public updateChosenAssetTokenAddress(side: Side, address: string) {
@@ -75,72 +75,72 @@ export class Dispatcher {
address,
side,
},
- type: ActionTypes.UPDATE_CHOSEN_ASSET_TOKEN_ADDRESS,
+ type: ActionTypes.UpdateChosenAssetTokenAddress,
});
}
public updateOrderTakerAddress(address: string) {
this.dispatch({
data: address,
- type: ActionTypes.UPDATE_ORDER_TAKER_ADDRESS,
+ type: ActionTypes.UpdateOrderTakerAddress,
});
}
public updateUserAddress(address: string) {
this.dispatch({
data: address,
- type: ActionTypes.UPDATE_USER_ADDRESS,
+ type: ActionTypes.UpdateUserAddress,
});
}
public updateOrderExpiry(unixTimestampSec: BigNumber) {
this.dispatch({
data: unixTimestampSec,
- type: ActionTypes.UPDATE_ORDER_EXPIRY,
+ type: ActionTypes.UpdateOrderExpiry,
});
}
public encounteredBlockchainError(err: BlockchainErrs) {
this.dispatch({
data: err,
- type: ActionTypes.BLOCKCHAIN_ERR_ENCOUNTERED,
+ type: ActionTypes.BlockchainErrEncountered,
});
}
public updateBlockchainIsLoaded(isLoaded: boolean) {
this.dispatch({
data: isLoaded,
- type: ActionTypes.UPDATE_BLOCKCHAIN_IS_LOADED,
+ type: ActionTypes.UpdateBlockchainIsLoaded,
});
}
public addTokenToTokenByAddress(token: Token) {
this.dispatch({
data: token,
- type: ActionTypes.ADD_TOKEN_TO_TOKEN_BY_ADDRESS,
+ type: ActionTypes.AddTokenToTokenByAddress,
});
}
public removeTokenToTokenByAddress(token: Token) {
this.dispatch({
data: token,
- type: ActionTypes.REMOVE_TOKEN_TO_TOKEN_BY_ADDRESS,
+ type: ActionTypes.RemoveTokenFromTokenByAddress,
});
}
public clearTokenByAddress() {
this.dispatch({
- type: ActionTypes.CLEAR_TOKEN_BY_ADDRESS,
+ type: ActionTypes.ClearTokenByAddress,
});
}
public updateTokenByAddress(tokens: Token[]) {
this.dispatch({
data: tokens,
- type: ActionTypes.UPDATE_TOKEN_BY_ADDRESS,
+ type: ActionTypes.UpdateTokenByAddress,
});
}
public updateTokenStateByAddress(tokenStateByAddress: TokenStateByAddress) {
this.dispatch({
data: tokenStateByAddress,
- type: ActionTypes.UPDATE_TOKEN_STATE_BY_ADDRESS,
+ type: ActionTypes.UpdateTokenStateByAddress,
});
}
public removeFromTokenStateByAddress(tokenAddress: string) {
this.dispatch({
data: tokenAddress,
- type: ActionTypes.REMOVE_FROM_TOKEN_STATE_BY_ADDRESS,
+ type: ActionTypes.RemoveFromTokenStateByAddress,
});
}
public replaceTokenAllowanceByAddress(address: string, allowance: BigNumber) {
@@ -149,7 +149,7 @@ export class Dispatcher {
address,
allowance,
},
- type: ActionTypes.REPLACE_TOKEN_ALLOWANCE_BY_ADDRESS,
+ type: ActionTypes.ReplaceTokenAllowanceByAddress,
});
}
public replaceTokenBalanceByAddress(address: string, balance: BigNumber) {
@@ -158,7 +158,7 @@ export class Dispatcher {
address,
balance,
},
- type: ActionTypes.REPLACE_TOKEN_BALANCE_BY_ADDRESS,
+ type: ActionTypes.ReplaceTokenBalanceByAddress,
});
}
public updateTokenBalanceByAddress(address: string, balanceDelta: BigNumber) {
@@ -167,31 +167,31 @@ export class Dispatcher {
address,
balanceDelta,
},
- type: ActionTypes.UPDATE_TOKEN_BALANCE_BY_ADDRESS,
+ type: ActionTypes.UpdateTokenBalanceByAddress,
});
}
public updateSignatureData(signatureData: SignatureData) {
this.dispatch({
data: signatureData,
- type: ActionTypes.UPDATE_ORDER_SIGNATURE_DATA,
+ type: ActionTypes.UpdateOrderSignatureData,
});
}
public updateUserEtherBalance(balance: BigNumber) {
this.dispatch({
data: balance,
- type: ActionTypes.UPDATE_USER_ETHER_BALANCE,
+ type: ActionTypes.UpdateUserEtherBalance,
});
}
public updateNetworkId(networkId: number) {
this.dispatch({
data: networkId,
- type: ActionTypes.UPDATE_NETWORK_ID,
+ type: ActionTypes.UpdateNetworkId,
});
}
public updateOrderFillAmount(amount: BigNumber) {
this.dispatch({
data: amount,
- type: ActionTypes.UPDATE_ORDER_FILL_AMOUNT,
+ type: ActionTypes.UpdateOrderFillAmount,
});
}
@@ -199,13 +199,13 @@ export class Dispatcher {
public updateCurrentDocsVersion(version: string) {
this.dispatch({
data: version,
- type: ActionTypes.UPDATE_LIBRARY_VERSION,
+ type: ActionTypes.UpdateLibraryVersion,
});
}
public updateAvailableDocVersions(versions: string[]) {
this.dispatch({
data: versions,
- type: ActionTypes.UPDATE_AVAILABLE_LIBRARY_VERSIONS,
+ type: ActionTypes.UpdateAvailableLibraryVersions,
});
}
@@ -213,23 +213,23 @@ export class Dispatcher {
public showFlashMessage(msg: string|React.ReactNode) {
this.dispatch({
data: msg,
- type: ActionTypes.SHOW_FLASH_MESSAGE,
+ type: ActionTypes.ShowFlashMessage,
});
}
public hideFlashMessage() {
this.dispatch({
- type: ActionTypes.HIDE_FLASH_MESSAGE,
+ type: ActionTypes.HideFlashMessage,
});
}
public updateProviderType(providerType: ProviderType) {
this.dispatch({
- type: ActionTypes.UPDATE_PROVIDER_TYPE,
+ type: ActionTypes.UpdateProviderType,
data: providerType,
});
}
public updateInjectedProviderName(injectedProviderName: string) {
this.dispatch({
- type: ActionTypes.UPDATE_INJECTED_PROVIDER_NAME,
+ type: ActionTypes.UpdateInjectedProviderName,
data: injectedProviderName,
});
}