From 5d45cf456c87a5af1e23c10465f7c8c48140acab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Oliveira?= Date: Fri, 26 Feb 2021 14:20:33 +0000 Subject: [PATCH] fix: use opid variable --- lib/plugins/wallet/zcashd/zcashd.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/plugins/wallet/zcashd/zcashd.js b/lib/plugins/wallet/zcashd/zcashd.js index 759fc639..e76acf0e 100644 --- a/lib/plugins/wallet/zcashd/zcashd.js +++ b/lib/plugins/wallet/zcashd/zcashd.js @@ -71,13 +71,13 @@ function sendCoins (account, address, cryptoAtoms, cryptoCode) { }) }) } - const checker = async () => { - return pRetry(checkSendStatus, { retries: 20, minTimeout: 300, factor: 1.05 }) - } + + const checker = opid => pRetry(() => checkSendStatus(opid), { retries: 20, minTimeout: 300, factor: 1.05 }) + return checkCryptoCode(cryptoCode) - .then(() => fetch('z_sendmany', ["ANY_TADDR", [{address, amount: coins}]])) + .then(() => fetch('z_sendmany', ['ANY_TADDR', [{ address, amount: coins }]])) .then(checker) - .then((res) => { + .then((res) => { return { fee: _.get('params.fee', res), txid: _.get('result.txid', res)