diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-10-30 01:26:27 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-10-30 01:37:56 +0800 |
commit | aab9bedd7fe1ab328e416024b6397f242d39d84f (patch) | |
tree | 5ffa6dc9d737d5dddd1b16c4ecb6fb65e6e85ee4 /packages/instant/test/util | |
parent | 8d1689073b702d973075d30b2bb36369487fad1c (diff) | |
parent | 4e4291eccdd6c837bbec70603aa6eb64d3aa8d85 (diff) | |
download | dexon-0x-contracts-aab9bedd7fe1ab328e416024b6397f242d39d84f.tar.gz dexon-0x-contracts-aab9bedd7fe1ab328e416024b6397f242d39d84f.tar.zst dexon-0x-contracts-aab9bedd7fe1ab328e416024b6397f242d39d84f.zip |
Merge branch 'development' into feature/instant/fixed-orders-in-render-method
* development:
Has Sufficient Funds/Balance -> Has Sufficient ETH
When transaction too low, treat as validation error. also modify callback: errorMessage could be AssetBuyError as well
onPendingValidation -> onValidationPending
linting
Simpler way of validaitng has enough eth
questionmark syntax instead of '| undefined'
Validate enough ETH when user clicks buy
acccount for no address
move funct into util
move imports
yarn.lock changes
feat(instant): Show message if user doesn't have enough ETH
ethDecimals -> ETH_DECIMALS
Diffstat (limited to 'packages/instant/test/util')
-rw-r--r-- | packages/instant/test/util/format.test.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/instant/test/util/format.test.ts b/packages/instant/test/util/format.test.ts index 2c9294c78..c346b7604 100644 --- a/packages/instant/test/util/format.test.ts +++ b/packages/instant/test/util/format.test.ts @@ -1,15 +1,15 @@ import { BigNumber } from '@0x/utils'; import { Web3Wrapper } from '@0x/web3-wrapper'; -import { ethDecimals } from '../../src/constants'; +import { ETH_DECIMALS } from '../../src/constants'; import { format } from '../../src/util/format'; const BIG_NUMBER_ONE = new BigNumber(1); const BIG_NUMBER_DECIMAL = new BigNumber(0.432414); const BIG_NUMBER_IRRATIONAL = new BigNumber(5.3014059295032); -const ONE_ETH_IN_BASE_UNITS = Web3Wrapper.toBaseUnitAmount(BIG_NUMBER_ONE, ethDecimals); -const DECIMAL_ETH_IN_BASE_UNITS = Web3Wrapper.toBaseUnitAmount(BIG_NUMBER_DECIMAL, ethDecimals); -const IRRATIONAL_ETH_IN_BASE_UNITS = Web3Wrapper.toBaseUnitAmount(BIG_NUMBER_IRRATIONAL, ethDecimals); +const ONE_ETH_IN_BASE_UNITS = Web3Wrapper.toBaseUnitAmount(BIG_NUMBER_ONE, ETH_DECIMALS); +const DECIMAL_ETH_IN_BASE_UNITS = Web3Wrapper.toBaseUnitAmount(BIG_NUMBER_DECIMAL, ETH_DECIMALS); +const IRRATIONAL_ETH_IN_BASE_UNITS = Web3Wrapper.toBaseUnitAmount(BIG_NUMBER_IRRATIONAL, ETH_DECIMALS); const BIG_NUMBER_FAKE_ETH_USD_PRICE = new BigNumber(2.534); describe('format', () => { |