aboutsummaryrefslogtreecommitdiffstats
path: root/src/0x.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-10-26 04:04:31 +0800
committerGitHub <noreply@github.com>2017-10-26 04:04:31 +0800
commite78398862b5e7bb08d15590c9bd0c656994b2a1f (patch)
treed1a719dd67857d2555369d9b377518061798b597 /src/0x.ts
parentfa3e88c454e8d25fe8725dc7bf8ea35d6c3e33ab (diff)
parent122a5e9b63b5b3617ad63a56b0673fd9dd974208 (diff)
downloaddexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.tar
dexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.tar.gz
dexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.tar.bz2
dexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.tar.lz
dexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.tar.xz
dexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.tar.zst
dexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.zip
Merge pull request #202 from 0xProject/fix/bignumber-types
Bignumber types
Diffstat (limited to 'src/0x.ts')
-rw-r--r--src/0x.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/0x.ts b/src/0x.ts
index 9f955c807..bc753434c 100644
--- a/src/0x.ts
+++ b/src/0x.ts
@@ -1,5 +1,5 @@
import * as _ from 'lodash';
-import * as BigNumber from 'bignumber.js';
+import BigNumber from 'bignumber.js';
import {SchemaValidator, schemas} from '0x-json-schemas';
import {bigNumberConfigs} from './bignumber_config';
import * as ethUtil from 'ethereumjs-util';
@@ -100,7 +100,7 @@ export class ZeroEx {
* and will not collide with other outstanding orders that are identical in all other parameters.
* @return A pseudo-random 256-bit number that can be used as a salt.
*/
- public static generatePseudoRandomSalt(): BigNumber.BigNumber {
+ public static generatePseudoRandomSalt(): BigNumber {
// BigNumber.random returns a pseudo-random number between 0 & 1 with a passed in number of decimal places.
// Source: https://mikemcl.github.io/bignumber.js/#random
const randomNumber = BigNumber.random(constants.MAX_DIGITS_IN_UNSIGNED_256_INT);
@@ -131,7 +131,7 @@ export class ZeroEx {
* @param decimals The number of decimal places the unit amount has.
* @return The amount in units.
*/
- public static toUnitAmount(amount: BigNumber.BigNumber, decimals: number): BigNumber.BigNumber {
+ public static toUnitAmount(amount: BigNumber, decimals: number): BigNumber {
assert.isBigNumber('amount', amount);
assert.isNumber('decimals', decimals);
@@ -147,7 +147,7 @@ export class ZeroEx {
* @param decimals The number of decimal places the unit amount has.
* @return The amount in baseUnits.
*/
- public static toBaseUnitAmount(amount: BigNumber.BigNumber, decimals: number): BigNumber.BigNumber {
+ public static toBaseUnitAmount(amount: BigNumber, decimals: number): BigNumber {
assert.isBigNumber('amount', amount);
assert.isNumber('decimals', decimals);