aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/redux/actions.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-11-09 09:22:21 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-11-09 09:22:21 +0800
commitb147cd888505443981781d200a68b949812cb3e9 (patch)
tree913e93af0dffeea1db6a34b818c68983f36bf46b /packages/instant/src/redux/actions.ts
parent211163b3724090347dba736cbcdcb2b1ec252bd0 (diff)
downloaddexon-sol-tools-b147cd888505443981781d200a68b949812cb3e9.tar
dexon-sol-tools-b147cd888505443981781d200a68b949812cb3e9.tar.gz
dexon-sol-tools-b147cd888505443981781d200a68b949812cb3e9.tar.bz2
dexon-sol-tools-b147cd888505443981781d200a68b949812cb3e9.tar.lz
dexon-sol-tools-b147cd888505443981781d200a68b949812cb3e9.tar.xz
dexon-sol-tools-b147cd888505443981781d200a68b949812cb3e9.tar.zst
dexon-sol-tools-b147cd888505443981781d200a68b949812cb3e9.zip
fix(instant): fix bug where we potentially fetch balance for the wrong account
Diffstat (limited to 'packages/instant/src/redux/actions.ts')
-rw-r--r--packages/instant/src/redux/actions.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/instant/src/redux/actions.ts b/packages/instant/src/redux/actions.ts
index 9b0d80152..fc89e3d0e 100644
--- a/packages/instant/src/redux/actions.ts
+++ b/packages/instant/src/redux/actions.ts
@@ -2,7 +2,7 @@ import { BuyQuote } from '@0x/asset-buyer';
import { BigNumber } from '@0x/utils';
import * as _ from 'lodash';
-import { ActionsUnion, Asset } from '../types';
+import { ActionsUnion, AddressAndEthBalanceInWei, Asset } from '../types';
export interface PlainAction<T extends string> {
type: T;
@@ -49,7 +49,8 @@ export const actions = {
setAccountStateLocked: () => createAction(ActionTypes.SET_ACCOUNT_STATE_LOCKED),
setAccountStateError: () => createAction(ActionTypes.SET_ACCOUNT_STATE_ERROR),
setAccountStateReady: (address: string) => createAction(ActionTypes.SET_ACCOUNT_STATE_READY, address),
- updateAccountEthBalance: (balance: BigNumber) => createAction(ActionTypes.UPDATE_ACCOUNT_ETH_BALANCE, balance),
+ updateAccountEthBalance: (addressAndBalance: AddressAndEthBalanceInWei) =>
+ createAction(ActionTypes.UPDATE_ACCOUNT_ETH_BALANCE, addressAndBalance),
updateEthUsdPrice: (price?: BigNumber) => createAction(ActionTypes.UPDATE_ETH_USD_PRICE, price),
updateSelectedAssetAmount: (amount?: BigNumber) => createAction(ActionTypes.UPDATE_SELECTED_ASSET_AMOUNT, amount),
setBuyOrderStateNone: () => createAction(ActionTypes.SET_BUY_ORDER_STATE_NONE),