You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to pack an object which stored values as BigNumber. This failed.
function parseNumber (arg) {
var type = typeof arg
if (type === 'string') {
if (utils.isHexPrefixed(arg)) {
return new BN(utils.stripHexPrefix(arg), 16)
} else {
return new BN(arg, 10)
}
} else if (type === 'number') {
return new BN(arg)
} else if (arg.toArray) {
// assume this is a BN for the moment, replace with BN.isBN soon
return arg
} else {
throw new Error('Argument is not a number')
}
}
Looks like there is some code which tries to guess for BN, but fails to do so properly.
Any intent on fixing this?
The text was updated successfully, but these errors were encountered:
Hey there,
I tried to pack an object which stored values as BigNumber. This failed.
Looks like there is some code which tries to guess for BN, but fails to do so properly.
Any intent on fixing this?
The text was updated successfully, but these errors were encountered: