diff options
author | Steve Klebanoff <steve@0xproject.com> | 2018-10-30 01:12:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-30 01:12:44 +0800 |
commit | 4e4291eccdd6c837bbec70603aa6eb64d3aa8d85 (patch) | |
tree | edf8006576143d5cd1c32b052164ac898c57c8b2 /packages/instant/src/util/format.ts | |
parent | ae6202ed3d777605a3fd02cd29141a3ba40f4b34 (diff) | |
parent | 7ed44f7b2f0224b4169f0a8f34bae09e8c6b986f (diff) | |
download | dexon-sol-tools-4e4291eccdd6c837bbec70603aa6eb64d3aa8d85.tar dexon-sol-tools-4e4291eccdd6c837bbec70603aa6eb64d3aa8d85.tar.gz dexon-sol-tools-4e4291eccdd6c837bbec70603aa6eb64d3aa8d85.tar.bz2 dexon-sol-tools-4e4291eccdd6c837bbec70603aa6eb64d3aa8d85.tar.lz dexon-sol-tools-4e4291eccdd6c837bbec70603aa6eb64d3aa8d85.tar.xz dexon-sol-tools-4e4291eccdd6c837bbec70603aa6eb64d3aa8d85.tar.zst dexon-sol-tools-4e4291eccdd6c837bbec70603aa6eb64d3aa8d85.zip |
Merge pull request #1193 from 0xProject/feature/not-enough-eth
[instant] Not enough ETH error message
Diffstat (limited to 'packages/instant/src/util/format.ts')
-rw-r--r-- | packages/instant/src/util/format.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/instant/src/util/format.ts b/packages/instant/src/util/format.ts index ca7c01359..4a48dec9d 100644 --- a/packages/instant/src/util/format.ts +++ b/packages/instant/src/util/format.ts @@ -2,7 +2,7 @@ import { BigNumber } from '@0x/utils'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; -import { ethDecimals } from '../constants'; +import { ETH_DECIMALS } from '../constants'; export const format = { ethBaseAmount: ( @@ -13,7 +13,7 @@ export const format = { if (_.isUndefined(ethBaseAmount)) { return defaultText; } - const ethUnitAmount = Web3Wrapper.toUnitAmount(ethBaseAmount, ethDecimals); + const ethUnitAmount = Web3Wrapper.toUnitAmount(ethBaseAmount, ETH_DECIMALS); return format.ethUnitAmount(ethUnitAmount, decimalPlaces); }, ethUnitAmount: ( @@ -36,7 +36,7 @@ export const format = { if (_.isUndefined(ethBaseAmount) || _.isUndefined(ethUsdPrice)) { return defaultText; } - const ethUnitAmount = Web3Wrapper.toUnitAmount(ethBaseAmount, ethDecimals); + const ethUnitAmount = Web3Wrapper.toUnitAmount(ethBaseAmount, ETH_DECIMALS); return format.ethUnitAmountInUsd(ethUnitAmount, ethUsdPrice, decimalPlaces); }, ethUnitAmountInUsd: ( |