feat: add script to sweep all ETH balance to a new wallet
This commit is contained in:
parent
c94d767f0b
commit
c16e0ea776
4 changed files with 145 additions and 11 deletions
|
|
@ -59,11 +59,11 @@ function _balance (settings, cryptoCode) {
|
|||
})
|
||||
}
|
||||
|
||||
function sendCoins (settings, tx) {
|
||||
function sendCoins (settings, tx, opts) {
|
||||
return fetchWallet(settings, tx.cryptoCode)
|
||||
.then(r => {
|
||||
const feeMultiplier = new BN(configManager.getWalletSettings(tx.cryptoCode, settings.config).feeMultiplier)
|
||||
return r.wallet.sendCoins(r.account, tx, settings, r.operatorId, feeMultiplier)
|
||||
return r.wallet.sendCoins(r.account, tx, settings, r.operatorId, feeMultiplier, opts)
|
||||
.then(res => {
|
||||
mem.clear(module.exports.balance)
|
||||
return res
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue