Changed name to amountInSatoshis.
This commit is contained in:
parent
48b8bbf90a
commit
f84b1e4f35
2 changed files with 3 additions and 3 deletions
|
|
@ -101,7 +101,7 @@
|
||||||
returns:
|
returns:
|
||||||
{
|
{
|
||||||
amount: '',
|
amount: '',
|
||||||
amountSatoshis: 0,
|
amountInSatoshis: 0,
|
||||||
bareUrl: '',
|
bareUrl: '',
|
||||||
coin: '',
|
coin: '',
|
||||||
copayInvitation: '',
|
copayInvitation: '',
|
||||||
|
|
@ -216,7 +216,7 @@
|
||||||
var amount = parseFloat(decodedValue);
|
var amount = parseFloat(decodedValue);
|
||||||
if (amount) { // Checking for NaN, or no numbers at all etc. & convert to satoshi
|
if (amount) { // Checking for NaN, or no numbers at all etc. & convert to satoshi
|
||||||
parsed.amount = decodedValue; // Need to check if a currency is precised
|
parsed.amount = decodedValue; // Need to check if a currency is precised
|
||||||
parsed.amountSatoshis = amount * 100000000
|
parsed.amountInSatoshis = amount * 100000000
|
||||||
} else {
|
} else {
|
||||||
return parsed;
|
return parsed;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ describe('bitcoinUriService', function() {
|
||||||
|
|
||||||
expect(parsed.isValid).toBe(true);
|
expect(parsed.isValid).toBe(true);
|
||||||
expect(parsed.amount).toBe('20.3');
|
expect(parsed.amount).toBe('20.3');
|
||||||
expect(parsed.amountSatoshis).toBe(2030000000);
|
expect(parsed.amountInSatoshis).toBe(2030000000);
|
||||||
expect(parsed.coin).toBe('btc');
|
expect(parsed.coin).toBe('btc');
|
||||||
expect(parsed.label).toBe('Luke-Jr');
|
expect(parsed.label).toBe('Luke-Jr');
|
||||||
expect(parsed.publicAddress.legacy).toBe('12nCRhMDfxVnuF3uYMXv2fNxBohNmacfWu');
|
expect(parsed.publicAddress.legacy).toBe('12nCRhMDfxVnuF3uYMXv2fNxBohNmacfWu');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue