From a3140c86416fde624e92db745c70ebc72d443a00 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 8 Jun 2017 11:45:35 +0200 Subject: rename decimals to numDecimals for clarity --- src/0x.js.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/0x.js.ts b/src/0x.js.ts index 8f1178b2a..d06069294 100644 --- a/src/0x.js.ts +++ b/src/0x.js.ts @@ -83,11 +83,11 @@ export class ZeroEx { * E.g: If a currency has 18 decimal places, 1e18 or one quintillion of the currency is equivalent * to 1 unit. */ - public static toUnitAmount(amount: BigNumber.BigNumber, decimals: number): BigNumber.BigNumber { + public static toUnitAmount(amount: BigNumber.BigNumber, numDecimals: number): BigNumber.BigNumber { assert.isBigNumber('amount', amount); - assert.isNumber('decimals', decimals); + assert.isNumber('numDecimals', numDecimals); - const aUnit = new BigNumber(10).pow(decimals); + const aUnit = new BigNumber(10).pow(numDecimals); const unit = amount.div(aUnit); return unit; } @@ -96,11 +96,11 @@ export class ZeroEx { * is the amount expressed in the smallest denomination. * E.g: 1 unit of a token with 18 decimal places is expressed in baseUnits as 1000000000000000000 */ - public static toBaseUnitAmount(amount: BigNumber.BigNumber, decimals: number): BigNumber.BigNumber { + public static toBaseUnitAmount(amount: BigNumber.BigNumber, numDecimals: number): BigNumber.BigNumber { assert.isBigNumber('amount', amount); - assert.isNumber('decimals', decimals); + assert.isNumber('numDecimals', numDecimals); - const unit = new BigNumber(10).pow(decimals); + const unit = new BigNumber(10).pow(numDecimals); const baseUnitAmount = amount.times(unit); return baseUnitAmount; } -- cgit