From: AJ ONeal Date: Sat, 25 Jun 2022 05:06:04 +0000 (-0600) Subject: fix: use DASH, not DUFF for QR amount X-Git-Tag: v1.4.0~4 X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=refs%2Fremotes%2Forigin%2Ffix-qr-amount;p=crowdnode.js%2F.git fix: use DASH, not DUFF for QR amount --- diff --git a/bin/crowdnode.js b/bin/crowdnode.js index 47357e2..8b8ce39 100755 --- a/bin/crowdnode.js +++ b/bin/crowdnode.js @@ -331,9 +331,10 @@ async function initCrowdNode(insightBaseUrl) { * @param {Number} duffs - 1/100000000 of a DASH */ function showQr(addr, duffs = 0) { + let dashAmount = toDash(duffs); let dashUri = `dash://${addr}`; if (duffs) { - dashUri += `?amount=${duffs}`; + dashUri += `?amount=${dashAmount}`; } let dashQr = Qr.ascii(dashUri, { indent: 4 });