aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/dialogs
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-06-06 16:33:21 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-06-06 16:33:35 +0800
commit2b4cd8b2ec5801786cd317870717260b503784dc (patch)
tree349dfe25c760ab25bfc7690dee98c3f664e30cbc /packages/website/ts/components/dialogs
parentb5dc72b126bc9b9572e5837ff10ee1e3d6b8916f (diff)
downloaddexon-sol-tools-2b4cd8b2ec5801786cd317870717260b503784dc.tar
dexon-sol-tools-2b4cd8b2ec5801786cd317870717260b503784dc.tar.gz
dexon-sol-tools-2b4cd8b2ec5801786cd317870717260b503784dc.tar.bz2
dexon-sol-tools-2b4cd8b2ec5801786cd317870717260b503784dc.tar.lz
dexon-sol-tools-2b4cd8b2ec5801786cd317870717260b503784dc.tar.xz
dexon-sol-tools-2b4cd8b2ec5801786cd317870717260b503784dc.tar.zst
dexon-sol-tools-2b4cd8b2ec5801786cd317870717260b503784dc.zip
Fix undefined ether balance
Diffstat (limited to 'packages/website/ts/components/dialogs')
-rw-r--r--packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx b/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx
index d647bba80..9ac78e80e 100644
--- a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx
+++ b/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx
@@ -20,7 +20,7 @@ interface EthWethConversionDialogProps {
onCancelled: () => void;
isOpen: boolean;
token: Token;
- etherBalanceInWei: BigNumber;
+ etherBalanceInWei?: BigNumber;
lastForceTokenStateRefetch: number;
}
@@ -60,7 +60,7 @@ export class EthWethConversionDialog extends React.Component<
<FlatButton key="convert" label="Convert" primary={true} onTouchTap={this._onConvertClick.bind(this)} />,
];
const title = this.props.direction === Side.Deposit ? 'Wrap ETH' : 'Unwrap WETH';
- return (
+ return !_.isUndefined(this.props.etherBalanceInWei) ? (
<Dialog
title={title}
titleStyle={{ fontWeight: 100 }}
@@ -70,7 +70,7 @@ export class EthWethConversionDialog extends React.Component<
>
{this._renderConversionDialogBody()}
</Dialog>
- );
+ ) : null;
}
private _renderConversionDialogBody(): React.ReactNode {
const explanation =