From fa15b26792922e8319a61f94e8a51db709b07e20 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 31 Aug 2018 18:36:40 +0900 Subject: [PATCH] Update bitcoin-uri.service.js Add the conversion to satoshi however a currency can be precised, in that case, the satoshi conversion should be not operated. --- src/js/services/bitcoin-uri.service.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/services/bitcoin-uri.service.js b/src/js/services/bitcoin-uri.service.js index 7d5cef2ba..e5aaacbc2 100644 --- a/src/js/services/bitcoin-uri.service.js +++ b/src/js/services/bitcoin-uri.service.js @@ -205,8 +205,8 @@ switch(key) { case 'amount': var amount = parseFloat(decodedValue); - if (amount) { // Checking for NaN, or no numbers at all etc. - parsed.amount = decodedValue; + if (amount) { // Checking for NaN, or no numbers at all etc. & convert to satoshi + parsed.amount = decodedValue * 100000000; // Need to check if a currency is precised } else { return parsed; } @@ -342,4 +342,4 @@ } -})(); \ No newline at end of file +})();