fix: use DASH, not DUFF for QR amount origin/fix-qr-amount
authorAJ ONeal <coolaj86@gmail.com>
Sat, 25 Jun 2022 05:06:04 +0000 (23:06 -0600)
committerAJ ONeal <coolaj86@gmail.com>
Sat, 25 Jun 2022 05:06:04 +0000 (23:06 -0600)
bin/crowdnode.js

index 47357e2d264f2d769df89fef6b605f5b81b3dd69..8b8ce396ff0be8d4a1ec0bc843052c1bf42e75e4 100755 (executable)
@@ -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 });