aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/eth_weth_conversion_button.tsx
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-12-20 05:58:06 +0800
committerFabio Berger <me@fabioberger.com>2017-12-20 05:58:06 +0800
commit41104b2d457b9b662122c139ee83bb8d0f519a51 (patch)
tree4743803be2564e0e5221b9a41e2c293a6fe52dd9 /packages/website/ts/components/eth_weth_conversion_button.tsx
parent2930537a512bdaa74181fea74ce6befdf5b305b4 (diff)
parentc39ac903a972930d538f8fa3292c658201b1c5e5 (diff)
downloaddexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar.gz
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar.zst
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.zip
Merge branch 'development' into createWethPage
* development: (27 commits) Remove re-assignment Fix scrolling topBar on Portal Fix overflow issue on calculated fillAmount Fix faulty import Introduce an identityCommandBuilder Define types for methodID Define types for ethereumjs-abi Install types for yargs Fix comments Fix linter issues Fix linter error Rename SubscriptionOpts to BlockRange Refactor remaining _.assign to spread operator Move muiTheme into it's own module Refactor configs and constants, standardize on uppercase/snakecase, alphebetize, rename for logical grouping Sort colors into color spectrum remove unused style standarize on `grey` over `gray` spelling and other color related fixes Standardize colors to always be in uppercase hex and consolidate material-ui greys Consolidate all custom colors and material-ui colors into a colors module ... # Conflicts: # packages/website/ts/components/eth_wrappers.tsx # packages/website/ts/components/portal.tsx # packages/website/ts/utils/configs.ts # packages/website/ts/utils/constants.ts
Diffstat (limited to 'packages/website/ts/components/eth_weth_conversion_button.tsx')
-rw-r--r--packages/website/ts/components/eth_weth_conversion_button.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/website/ts/components/eth_weth_conversion_button.tsx b/packages/website/ts/components/eth_weth_conversion_button.tsx
index c8a279de9..e802b8782 100644
--- a/packages/website/ts/components/eth_weth_conversion_button.tsx
+++ b/packages/website/ts/components/eth_weth_conversion_button.tsx
@@ -45,7 +45,7 @@ export class EthWethConversionButton extends
const labelStyle = this.state.isEthConversionHappening ? {fontSize: 10} : {};
let callToActionLabel;
let inProgressLabel;
- if (this.props.direction === Side.deposit) {
+ if (this.props.direction === Side.Deposit) {
callToActionLabel = 'Wrap';
inProgressLabel = 'Wrapping...';
} else {
@@ -87,9 +87,9 @@ export class EthWethConversionButton extends
const tokenState = this.props.ethTokenState;
let balance = tokenState.balance;
try {
- if (direction === Side.deposit) {
+ if (direction === Side.Deposit) {
await this.props.blockchain.convertEthToWrappedEthTokensAsync(token.address, value);
- const ethAmount = ZeroEx.toUnitAmount(value, constants.ETH_DECIMAL_PLACES);
+ const ethAmount = ZeroEx.toUnitAmount(value, constants.DECIMAL_PLACES_ETH);
this.props.dispatcher.showFlashMessage(`Successfully wrapped ${ethAmount.toString()} ETH to WETH`);
balance = balance.plus(value);
} else {
@@ -104,13 +104,13 @@ export class EthWethConversionButton extends
this.props.onConversionSuccessful();
} catch (err) {
const errMsg = '' + err;
- if (_.includes(errMsg, BlockchainCallErrs.USER_HAS_NO_ASSOCIATED_ADDRESSES)) {
+ if (_.includes(errMsg, BlockchainCallErrs.UserHasNoAssociatedAddresses)) {
this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
} else if (!_.includes(errMsg, 'User denied transaction')) {
utils.consoleLog(`Unexpected error encountered: ${err}`);
utils.consoleLog(err.stack);
await errorReporter.reportAsync(err);
- const errorMsg = direction === Side.deposit ?
+ const errorMsg = direction === Side.Deposit ?
'Failed to wrap your ETH. Please try again.' :
'Failed to unwrap your WETH. Please try again.';
this.props.dispatcher.showFlashMessage(errorMsg);