aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/redux
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-10 02:02:07 +0800
committerFabio Berger <me@fabioberger.com>2018-03-10 02:02:07 +0800
commit7ebebb5bd9e0b60aab8dfac22bc1663d3fc13285 (patch)
treef943b6a3aabfea45eadc222e9bbfc3a2ce2906e9 /packages/website/ts/redux
parent8f921a61da6b9976ea680df4fd51147bb78040d9 (diff)
downloaddexon-sol-tools-7ebebb5bd9e0b60aab8dfac22bc1663d3fc13285.tar
dexon-sol-tools-7ebebb5bd9e0b60aab8dfac22bc1663d3fc13285.tar.gz
dexon-sol-tools-7ebebb5bd9e0b60aab8dfac22bc1663d3fc13285.tar.bz2
dexon-sol-tools-7ebebb5bd9e0b60aab8dfac22bc1663d3fc13285.tar.lz
dexon-sol-tools-7ebebb5bd9e0b60aab8dfac22bc1663d3fc13285.tar.xz
dexon-sol-tools-7ebebb5bd9e0b60aab8dfac22bc1663d3fc13285.tar.zst
dexon-sol-tools-7ebebb5bd9e0b60aab8dfac22bc1663d3fc13285.zip
Create blockchainWatcher class and refactor Portal such that Ether amounts are always passed around as baseUnits
Diffstat (limited to 'packages/website/ts/redux')
-rw-r--r--packages/website/ts/redux/dispatcher.ts2
-rw-r--r--packages/website/ts/redux/reducer.ts6
2 files changed, 4 insertions, 4 deletions
diff --git a/packages/website/ts/redux/dispatcher.ts b/packages/website/ts/redux/dispatcher.ts
index 5c40ded2c..e40d435e0 100644
--- a/packages/website/ts/redux/dispatcher.ts
+++ b/packages/website/ts/redux/dispatcher.ts
@@ -155,7 +155,7 @@ export class Dispatcher {
type: ActionTypes.UpdateOrderECSignature,
});
}
- public updateUserEtherBalance(balance: BigNumber) {
+ public updateUserWeiBalance(balance: BigNumber) {
this._dispatch({
data: balance,
type: ActionTypes.UpdateUserEtherBalance,
diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts
index 1f489db85..1d43e4ffb 100644
--- a/packages/website/ts/redux/reducer.ts
+++ b/packages/website/ts/redux/reducer.ts
@@ -38,7 +38,7 @@ export interface State {
tokenByAddress: TokenByAddress;
lastForceTokenStateRefetch: number;
userAddress: string;
- userEtherBalance: BigNumber;
+ userEtherBalanceInWei: BigNumber;
// Note: cache of supplied orderJSON in fill order step. Do not use for anything else.
userSuppliedOrderCache: Order;
@@ -77,7 +77,7 @@ const INITIAL_STATE: State = {
tokenByAddress: {},
lastForceTokenStateRefetch: moment().unix(),
userAddress: '',
- userEtherBalance: new BigNumber(0),
+ userEtherBalanceInWei: new BigNumber(0),
userSuppliedOrderCache: undefined,
// Docs
@@ -138,7 +138,7 @@ export function reducer(state: State = INITIAL_STATE, action: Action) {
case ActionTypes.UpdateUserEtherBalance: {
return {
...state,
- userEtherBalance: action.data,
+ userEtherBalanceInWei: action.data,
};
}