aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/redux
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-06-01 02:40:21 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-06-01 02:54:25 +0800
commitdf27f4f1183e5d5879aa0768b2edfef091750ec5 (patch)
tree9b9ba591f9cc1cc34c56440e4368433150acb99d /packages/website/ts/redux
parentbee26daf0c2497a11dfe944d355c4958329d1f50 (diff)
downloaddexon-sol-tools-df27f4f1183e5d5879aa0768b2edfef091750ec5.tar
dexon-sol-tools-df27f4f1183e5d5879aa0768b2edfef091750ec5.tar.gz
dexon-sol-tools-df27f4f1183e5d5879aa0768b2edfef091750ec5.tar.bz2
dexon-sol-tools-df27f4f1183e5d5879aa0768b2edfef091750ec5.tar.lz
dexon-sol-tools-df27f4f1183e5d5879aa0768b2edfef091750ec5.tar.xz
dexon-sol-tools-df27f4f1183e5d5879aa0768b2edfef091750ec5.tar.zst
dexon-sol-tools-df27f4f1183e5d5879aa0768b2edfef091750ec5.zip
Change userEtherBalanceInWei to optional so we can know if its loading
Diffstat (limited to 'packages/website/ts/redux')
-rw-r--r--packages/website/ts/redux/dispatcher.ts2
-rw-r--r--packages/website/ts/redux/reducer.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/redux/dispatcher.ts b/packages/website/ts/redux/dispatcher.ts
index 0b4cc3938..e0ce43ae5 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 updateUserWeiBalance(balance: BigNumber): void {
+ public updateUserWeiBalance(balance?: BigNumber): void {
this._dispatch({
data: balance,
type: ActionTypes.UpdateUserEtherBalance,
diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts
index 5c57792f7..9d3d8f7d9 100644
--- a/packages/website/ts/redux/reducer.ts
+++ b/packages/website/ts/redux/reducer.ts
@@ -39,7 +39,7 @@ export interface State {
tokenByAddress: TokenByAddress;
lastForceTokenStateRefetch: number;
userAddress: string;
- userEtherBalanceInWei: BigNumber;
+ userEtherBalanceInWei?: BigNumber;
portalOnboardingStep: number;
isPortalOnboardingShowing: boolean;
hasPortalOnboardingBeenSeen: boolean;
@@ -81,7 +81,7 @@ export const INITIAL_STATE: State = {
tokenByAddress: {},
lastForceTokenStateRefetch: moment().unix(),
userAddress: '',
- userEtherBalanceInWei: new BigNumber(0),
+ userEtherBalanceInWei: undefined,
userSuppliedOrderCache: undefined,
portalOnboardingStep: 0,
isPortalOnboardingShowing: false,