Changed name to amountInSatoshis.

This commit is contained in:
Brendon Duncan 2018-09-03 13:02:28 +12:00
commit f84b1e4f35
2 changed files with 3 additions and 3 deletions

View file

@ -101,7 +101,7 @@
returns:
{
amount: '',
amountSatoshis: 0,
amountInSatoshis: 0,
bareUrl: '',
coin: '',
copayInvitation: '',
@ -216,7 +216,7 @@
var amount = parseFloat(decodedValue);
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.amountSatoshis = amount * 100000000
parsed.amountInSatoshis = amount * 100000000
} else {
return parsed;
}

View file

@ -113,7 +113,7 @@ describe('bitcoinUriService', function() {
expect(parsed.isValid).toBe(true);
expect(parsed.amount).toBe('20.3');
expect(parsed.amountSatoshis).toBe(2030000000);
expect(parsed.amountInSatoshis).toBe(2030000000);
expect(parsed.coin).toBe('btc');
expect(parsed.label).toBe('Luke-Jr');
expect(parsed.publicAddress.legacy).toBe('12nCRhMDfxVnuF3uYMXv2fNxBohNmacfWu');