Add default value for onConversionSuccessful
This commit is contained in:
parent
ac1fbeb962
commit
94f40a54b4
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user