Skip to content

Commit

Permalink
chore(): update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Jiang committed Apr 22, 2019
1 parent 546b265 commit 27d2633
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"ara-crypto": "^0.8.x",
"ara-identity": "^0.60.x",
"ara-runtime-configuration": "^1.x.x",
"ara-util": "^1.3.x",
"ara-util": "^1.4.x",
"bignumber.js": "^8.0.1",
"buffer-from": "^1.1.1",
"cross-spawn": "^5.1.0",
Expand All @@ -71,7 +71,7 @@
"rimraf": "^2.6.2",
"solc": "^0.4.24",
"truffle-hdwallet-provider": "0.0.6",
"web3": "1.0.0-beta.52",
"web3": "1.0.0-beta.37",
"which": "^1.3.1",
"yargs": "^12.0.1"
},
Expand Down
1 change: 0 additions & 1 deletion test/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ test('expandTokenValue(val)', (t) => {

test('expandTokenValue(val) invalid input', (t) => {
t.throws(() => token.expandTokenValue(), TypeError)
t.throws(() => token.expandTokenValue(123), TypeError)
t.throws(() => token.expandTokenValue({ }), TypeError)
t.throws(() => token.expandTokenValue([ ]), TypeError)
t.throws(() => token.expandTokenValue([ '1' ]), TypeError)
Expand Down
7 changes: 2 additions & 5 deletions token.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,8 @@ function expandTokenValue(val) {
* @throws {TypeError}
*/
function constrainTokenValue(val) {
if ('string' !== typeof val && 'object' !== typeof val) {
throw new TypeError(`Expected 'val' to be of type string or BigNumber. Got ${val}. Ensure ${val} is the string or BigNumber representation of a positive number.`)
}
if ('object' === val) {
return BigNumber(`${val.toString()}e-${TOKEN_DECIMALS}`).toString()
if ('string' !== typeof val) {
throw new TypeError(`Expected 'val' to be of type string. Got ${val}. Ensure ${val} is the string representation of a positive number.`)
}
if (!val) {
return '0'
Expand Down

0 comments on commit 27d2633

Please sign in to comment.