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.
This commit is contained in:
parent
ef23746de6
commit
fa15b26792
1 changed files with 3 additions and 3 deletions
|
|
@ -205,8 +205,8 @@
|
||||||
switch(key) {
|
switch(key) {
|
||||||
case 'amount':
|
case 'amount':
|
||||||
var amount = parseFloat(decodedValue);
|
var amount = parseFloat(decodedValue);
|
||||||
if (amount) { // Checking for NaN, or no numbers at all etc.
|
if (amount) { // Checking for NaN, or no numbers at all etc. & convert to satoshi
|
||||||
parsed.amount = decodedValue;
|
parsed.amount = decodedValue * 100000000; // Need to check if a currency is precised
|
||||||
} else {
|
} else {
|
||||||
return parsed;
|
return parsed;
|
||||||
}
|
}
|
||||||
|
|
@ -342,4 +342,4 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue