Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62bcd2aa95 | ||
|
|
1eec6aa329 | ||
|
|
715ad59273 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tx-manager",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.2",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -13,13 +13,15 @@
|
||||
"keywords": [],
|
||||
"author": "Roman Semenov <semenov.roma@gmail.com>",
|
||||
"license": "ISC",
|
||||
"repository": "https://github.com/tornadocash/tx-manager",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/tornadocash/tx-manager.git"
|
||||
},
|
||||
"files": [
|
||||
"src/*"
|
||||
],
|
||||
"dependencies": {
|
||||
"async-mutex": "^0.2.4",
|
||||
"bn.js": "^5.1.3",
|
||||
"ethers": "^5.0.17",
|
||||
"gas-price-oracle": "^0.1.5",
|
||||
"web3-core-promievent": "^1.3.0"
|
||||
|
||||
@@ -341,7 +341,7 @@ class Transaction {
|
||||
const gasPrices = await this._gasPriceOracle.gasPrices()
|
||||
const result = gasPrices[type].toString()
|
||||
console.log(`${type} gas price is now ${result} gwei`)
|
||||
return parseUnits(gasPrices[type], 'gwei').toHexString()
|
||||
return parseUnits(result, 'gwei').toHexString()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
const BN = require('bn.js')
|
||||
const { BigNumber } = require('ethers')
|
||||
|
||||
/**
|
||||
* A promise that resolves after `ms` milliseconds
|
||||
*/
|
||||
const sleep = ms => new Promise(res => setTimeout(res, ms))
|
||||
|
||||
const max = (a, b) => BigNumber.from(BN.max(new BN(a.toString()), new BN(b.toString())).toString())
|
||||
const max = (a, b) => (a.gt(b) ? a : b)
|
||||
|
||||
const min = (a, b) => BigNumber.from(BN.min(new BN(a.toString()), new BN(b.toString())).toString())
|
||||
const min = (a, b) => (a.lt(b) ? a : b)
|
||||
|
||||
module.exports = {
|
||||
sleep,
|
||||
|
||||
@@ -593,11 +593,6 @@ bn.js@^4.4.0:
|
||||
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828"
|
||||
integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==
|
||||
|
||||
bn.js@^5.1.3:
|
||||
version "5.1.3"
|
||||
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b"
|
||||
integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
|
||||
Reference in New Issue
Block a user