diff options
author | Fabio Berger <me@fabioberger.com> | 2017-12-16 01:05:53 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-12-16 01:05:53 +0800 |
commit | 94f40a54b42d467d9588862e11b2be45eb8f232c (patch) | |
tree | acd89e4cc42af5eeb63b9d85649125d2f8f60c2d /packages/website/ts | |
parent | ac1fbeb9623682ce678990d1815fcff63a6c40ae (diff) | |
download | dexon-0x-contracts-94f40a54b42d467d9588862e11b2be45eb8f232c.tar.gz dexon-0x-contracts-94f40a54b42d467d9588862e11b2be45eb8f232c.tar.zst dexon-0x-contracts-94f40a54b42d467d9588862e11b2be45eb8f232c.zip |
Add default value for onConversionSuccessful
Diffstat (limited to 'packages/website/ts')
-rw-r--r-- | packages/website/ts/components/eth_weth_conversion_button.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/website/ts/components/eth_weth_conversion_button.tsx b/packages/website/ts/components/eth_weth_conversion_button.tsx index bf686d44b..b017de27b 100644 --- a/packages/website/ts/components/eth_weth_conversion_button.tsx +++ b/packages/website/ts/components/eth_weth_conversion_button.tsx @@ -32,6 +32,7 @@ export class EthWethConversionButton extends React.Component<EthWethConversionButtonProps, EthWethConversionButtonState> { public static defaultProps: Partial<EthWethConversionButtonProps> = { isDisabled: false, + onConversionSuccessful: _.noop, }; public constructor(props: EthWethConversionButtonProps) { super(props); @@ -100,9 +101,7 @@ export class EthWethConversionButton extends if (!this.props.isOutdatedWrappedEther) { this.props.dispatcher.replaceTokenBalanceByAddress(token.address, balance); } - if (!_.isUndefined(this.props.onConversionSuccessful)) { - this.props.onConversionSuccessful(); - } + this.props.onConversionSuccessful(); } catch (err) { const errMsg = '' + err; if (_.includes(errMsg, BlockchainCallErrs.USER_HAS_NO_ASSOCIATED_ADDRESSES)) { |