mirror of https://github.com/BTCPrivate/copay.git
Fix fetchPaypro. Update package-lock
This commit is contained in:
parent
e2e150c48c
commit
e2237fce31
|
@ -2261,9 +2261,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcore-payment-protocol": {
|
"bitcore-payment-protocol": {
|
||||||
"version": "1.5.0",
|
"version": "1.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/bitcore-payment-protocol/-/bitcore-payment-protocol-1.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/bitcore-payment-protocol/-/bitcore-payment-protocol-1.6.0.tgz",
|
||||||
"integrity": "sha512-ShBZ9eMpP2bS6phKHTdL2AonYzUYvc1xdsB/Ot1mG9G2o8Tmx44zNL5+JpOQ2VYk3FtBFQZzpnLPIA19Apvi1g==",
|
"integrity": "sha512-w9JHO6XGXj/fKMRnBIeiLgCLTnxrv3iipzdnnnEWjca/VXpv57bCDQrq2i+TZJDkN0XqW8hJqyXPgLId2mRRAg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"asn1.js": "4.9.1",
|
"asn1.js": "4.9.1",
|
||||||
"asn1.js-rfc3280": "4.0.0",
|
"asn1.js-rfc3280": "4.0.0",
|
||||||
|
@ -2285,16 +2285,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcore-wallet-client": {
|
"bitcore-wallet-client": {
|
||||||
"version": "6.5.0",
|
"version": "6.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/bitcore-wallet-client/-/bitcore-wallet-client-6.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/bitcore-wallet-client/-/bitcore-wallet-client-6.6.0.tgz",
|
||||||
"integrity": "sha512-k3WCBJUjKFHBtkAQLudkmxl11UiNYO8Q59NSR7Bs3au6ERG6LspG1FZRPKVCQBYC4b+gIZY3uKSEw0W7fj1uLw==",
|
"integrity": "sha512-9ZbB2vBWFT9NmAosizXM81EfyF+c8yf4Vg4VFO+dBtVPQTGwOxdqVg7/+R7G42KllewjNm2XVInQ6uzxfe54og==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"async": "0.9.2",
|
"async": "0.9.2",
|
||||||
"bip38": "1.4.0",
|
"bip38": "1.4.0",
|
||||||
"bitcore-lib": "0.15.0",
|
"bitcore-lib": "0.15.0",
|
||||||
"bitcore-lib-cash": "0.16.3",
|
"bitcore-lib-cash": "0.16.3",
|
||||||
"bitcore-mnemonic": "1.5.0",
|
"bitcore-mnemonic": "1.5.0",
|
||||||
"bitcore-payment-protocol": "1.5.0",
|
"bitcore-payment-protocol": "1.6.0",
|
||||||
"grunt-jsdox": "github:matiu/grunt-jsdox#529d718505336889abaca02bdb3edcfbe0dd3a8d",
|
"grunt-jsdox": "github:matiu/grunt-jsdox#529d718505336889abaca02bdb3edcfbe0dd3a8d",
|
||||||
"json-stable-stringify": "1.0.1",
|
"json-stable-stringify": "1.0.1",
|
||||||
"lodash": "4.17.5",
|
"lodash": "4.17.5",
|
||||||
|
@ -2303,6 +2303,21 @@
|
||||||
"superagent": "3.8.2"
|
"superagent": "3.8.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"grunt-jsdox": {
|
||||||
|
"version": "github:matiu/grunt-jsdox#529d718505336889abaca02bdb3edcfbe0dd3a8d",
|
||||||
|
"requires": {
|
||||||
|
"jsdox": "0.4.10",
|
||||||
|
"lodash": "2.4.2",
|
||||||
|
"q": "1.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"lodash": {
|
||||||
|
"version": "2.4.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
|
||||||
|
"integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"preconditions": {
|
"preconditions": {
|
||||||
"version": "1.0.8",
|
"version": "1.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/preconditions/-/preconditions-1.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/preconditions/-/preconditions-1.0.8.tgz",
|
||||||
|
@ -7401,21 +7416,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
||||||
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
|
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
|
||||||
},
|
},
|
||||||
"grunt-jsdox": {
|
|
||||||
"version": "github:matiu/grunt-jsdox#529d718505336889abaca02bdb3edcfbe0dd3a8d",
|
|
||||||
"requires": {
|
|
||||||
"jsdox": "0.4.10",
|
|
||||||
"lodash": "2.4.2",
|
|
||||||
"q": "1.0.1"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"lodash": {
|
|
||||||
"version": "2.4.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
|
|
||||||
"integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"handle-thing": {
|
"handle-thing": {
|
||||||
"version": "1.2.5",
|
"version": "1.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz",
|
||||||
|
|
|
@ -343,10 +343,7 @@ export class BitPayCardTopUpPage {
|
||||||
invoice['buyerPaidBtcMinerFee'] = invoice.buyerPaidBtcMinerFee || 0;
|
invoice['buyerPaidBtcMinerFee'] = invoice.buyerPaidBtcMinerFee || 0;
|
||||||
let invoiceFeeSat = (invoice.buyerPaidBtcMinerFee * 100000000).toFixed();
|
let invoiceFeeSat = (invoice.buyerPaidBtcMinerFee * 100000000).toFixed();
|
||||||
|
|
||||||
this.message = this.translate.instant("Top up {{amountStr}} to debit card ({{cardLastNumber}})", {
|
this.message = 'Top up ' + this.amountUnitStr + ' to debit card (' + this.lastFourDigits + ')';
|
||||||
amountStr: this.amountUnitStr,
|
|
||||||
cardLastNumber: this.lastFourDigits
|
|
||||||
});
|
|
||||||
|
|
||||||
this.createTx(wallet, invoice, this.message).then((ctxp) => {
|
this.createTx(wallet, invoice, this.message).then((ctxp) => {
|
||||||
this.onGoingProcessProvider.clear();
|
this.onGoingProcessProvider.clear();
|
||||||
|
|
|
@ -51,7 +51,7 @@ export class IncomingDataProvider {
|
||||||
|
|
||||||
data = decodeURIComponent(data.replace(/bitcoin(cash)?:\?r=/, ''));
|
data = decodeURIComponent(data.replace(/bitcoin(cash)?:\?r=/, ''));
|
||||||
|
|
||||||
this.payproProvider.getPayProDetails(data).then((details) => {
|
this.payproProvider.getPayProDetails(data, coin).then((details) => {
|
||||||
this.handlePayPro(details, coin);
|
this.handlePayPro(details, coin);
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
this.popupProvider.ionicAlert(this.translate.instant('Error'), err);
|
this.popupProvider.ionicAlert(this.translate.instant('Error'), err);
|
||||||
|
@ -77,7 +77,7 @@ export class IncomingDataProvider {
|
||||||
amount = parsed.amount ? parsed.amount : '';
|
amount = parsed.amount ? parsed.amount : '';
|
||||||
|
|
||||||
if (parsed.r) {
|
if (parsed.r) {
|
||||||
this.payproProvider.getPayProDetails(parsed.r).then((details) => {
|
this.payproProvider.getPayProDetails(parsed.r, coin).then((details) => {
|
||||||
this.handlePayPro(details, coin);
|
this.handlePayPro(details, coin);
|
||||||
}).catch((err: string) => {
|
}).catch((err: string) => {
|
||||||
if (addr && amount) this.goSend(addr, amount, message, coin);
|
if (addr && amount) this.goSend(addr, amount, message, coin);
|
||||||
|
@ -104,7 +104,7 @@ export class IncomingDataProvider {
|
||||||
|
|
||||||
// paypro not yet supported on cash
|
// paypro not yet supported on cash
|
||||||
if (parsed.r) {
|
if (parsed.r) {
|
||||||
this.payproProvider.getPayProDetails(parsed.r).then((details: any) => {
|
this.payproProvider.getPayProDetails(parsed.r, coin).then((details: any) => {
|
||||||
this.handlePayPro(details, coin);
|
this.handlePayPro(details, coin);
|
||||||
}).catch((err: string) => {
|
}).catch((err: string) => {
|
||||||
if (addr && amount)
|
if (addr && amount)
|
||||||
|
@ -143,7 +143,7 @@ export class IncomingDataProvider {
|
||||||
|
|
||||||
// paypro not yet supported on cash
|
// paypro not yet supported on cash
|
||||||
if (parsed.r) {
|
if (parsed.r) {
|
||||||
this.payproProvider.getPayProDetails(parsed.r).then((details) => {
|
this.payproProvider.getPayProDetails(parsed.r, coin).then((details) => {
|
||||||
this.handlePayPro(details, coin);
|
this.handlePayPro(details, coin);
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
if (addr && amount)
|
if (addr && amount)
|
||||||
|
@ -160,7 +160,9 @@ export class IncomingDataProvider {
|
||||||
} else if (/^https?:\/\//.test(data)) {
|
} else if (/^https?:\/\//.test(data)) {
|
||||||
this.logger.debug('Handling Plain URL');
|
this.logger.debug('Handling Plain URL');
|
||||||
|
|
||||||
this.payproProvider.getPayProDetails(data).then((details) => {
|
let coin = 'btc';
|
||||||
|
|
||||||
|
this.payproProvider.getPayProDetails(data, coin).then((details) => {
|
||||||
// TODO review
|
// TODO review
|
||||||
this.handlePayPro(details, 'btc');
|
this.handlePayPro(details, 'btc');
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -17,11 +17,12 @@ export class PayproProvider {
|
||||||
this.logger.info('PayproProvider initialized');
|
this.logger.info('PayproProvider initialized');
|
||||||
}
|
}
|
||||||
|
|
||||||
public getPayProDetails(uri: string, disableLoader?: boolean): Promise<any> {
|
public getPayProDetails(uri: string, coin: string, disableLoader?: boolean): Promise<any> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
||||||
let wallet: any = this.profileProvider.getWallets({
|
let wallet: any = this.profileProvider.getWallets({
|
||||||
onlyComplete: true
|
onlyComplete: true,
|
||||||
|
coin
|
||||||
})[0];
|
})[0];
|
||||||
|
|
||||||
if (!wallet) return resolve();
|
if (!wallet) return resolve();
|
||||||
|
|
Loading…
Reference in New Issue