chore: update big number package

This commit is contained in:
José Oliveira 2021-06-15 22:34:36 +01:00 committed by Josh Harvey
parent 8aa18dd21c
commit ea44478b48
30 changed files with 186 additions and 144 deletions

View file

@ -38,7 +38,7 @@ function connect (url) {
}
}
const hex = bigNum => '0x' + bigNum.truncated().toString(16)
const hex = bigNum => '0x' + bigNum.integerValue(BN.ROUND_DOWN).toString(16)
function privateKey (account) {
return defaultWallet(account).getPrivateKey()
@ -57,7 +57,7 @@ function sendCoins (account, tx, settings, operatorId) {
.then(tx => {
if (!tx) return { txid }
const fee = BN(tx.gas).mul(BN(tx.gasPrice)).round()
const fee = new BN(tx.gas).times(new BN(tx.gasPrice)).decimalPlaces(0)
return { txid, fee }
})