Fix: Warnings and finish modal on bitpay card top up

This commit is contained in:
Gabriel Masclef 2018-02-20 12:58:45 -03:00
parent 0718b8b5a1
commit b651fdab98
No known key found for this signature in database
GPG Key ID: DD6D7EAADE12280D
12 changed files with 22 additions and 24 deletions

View File

@ -37,6 +37,7 @@ import { BackupWarningPage } from '../pages/backup/backup-warning/backup-warning
import { FeedbackCompletePage } from '../pages/feedback/feedback-complete/feedback-complete';
import { FeedbackPage } from '../pages/feedback/feedback/feedback';
import { SendFeedbackPage } from '../pages/feedback/send-feedback/send-feedback';
import { FinishModalPage } from '../pages/finish/finish';
import { IncomingDataMenuPage } from '../pages/incoming-data-menu/incoming-data-menu';
import { BackupRequestPage } from '../pages/onboarding/backup-request/backup-request';
import { CollectEmailPage } from '../pages/onboarding/collect-email/collect-email';
@ -47,7 +48,6 @@ import { PaperWalletPage } from '../pages/paper-wallet/paper-wallet';
import { PayProPage } from '../pages/paypro/paypro';
import { FeeWarningPage } from '../pages/send/fee-warning/fee-warning';
import { BitcoinCashPage } from '../pages/settings/bitcoin-cash/bitcoin-cash';
import { FinishModalPage } from '../pages/finish/finish';
import { TabsPage } from '../pages/tabs/tabs';
import { TxDetailsPage } from '../pages/tx-details/tx-details';
import { TxpDetailsPage } from '../pages/txp-details/txp-details';

View File

@ -6,8 +6,8 @@ import * as moment from 'moment';
import { Logger } from '../../../../providers/logger/logger';
// Pages
import { FeeWarningPage } from '../../../send/fee-warning/fee-warning';
import { FinishModalPage } from '../../../finish/finish';
import { FeeWarningPage } from '../../../send/fee-warning/fee-warning';
import { AmazonPage } from '../amazon';
// Provider
@ -412,7 +412,7 @@ export class BuyAmazonPage {
});
}
public openFinishModal(): void {
private openFinishModal(): void {
let finishComment: string;
let cssClass: string;
if (this.amazonGiftCard.status == 'FAILURE') {

View File

@ -5,8 +5,8 @@ import * as _ from 'lodash';
import { Logger } from '../../../../providers/logger/logger';
// Pages
import { FeeWarningPage } from '../../../send/fee-warning/fee-warning';
import { FinishModalPage } from '../../../finish/finish';
import { FeeWarningPage } from '../../../send/fee-warning/fee-warning';
import { BitPayCardPage } from '../bitpay-card';
// Provider
@ -45,7 +45,6 @@ export class BitPayCardTopUpPage {
public networkFee;
public totalAmount;
public wallet;
public sendStatus;
public currencyIsoCode;
public amountUnitStr;
public lastFourDigits;
@ -382,14 +381,13 @@ export class BitPayCardTopUpPage {
let cancelText = this.translate.instant('Cancel');
this.popupProvider.ionicConfirm(title, this.message, okText, cancelText).then((ok) => {
if (!ok) {
this.sendStatus = '';
return;
}
this.onGoingProcessProvider.set('topup', true);
this.publishAndSign(this.wallet, this.createdTx).then((txSent) => {
this.onGoingProcessProvider.set('topup', false);
this.sendStatus = 'success';
this.openFinishModal();
}).catch((err) => {
this.onGoingProcessProvider.set('topup', false);
this._resetValues();
@ -422,12 +420,12 @@ export class BitPayCardTopUpPage {
});
}
public openFinishModal(): void {
private openFinishModal(): void {
let finishComment: string;
if (this.sendStatus == 'success') {
if (this.wallet.credentials.m == 1)
if (this.wallet.credentials.m == 1) {
finishComment = this.translate.instant('Funds were added to debit card');
else
}
else {
finishComment = this.translate.instant('Transaction initiated');
}
let finishText = '';

View File

@ -292,7 +292,7 @@ export class BuyCoinbasePage {
});
}
public openFinishModal(): void {
private openFinishModal(): void {
let finishText = 'Bought';
let finishComment = 'Bitcoin purchase completed. Coinbase has queued the transfer to your selected wallet';
let modal = this.modalCtrl.create(FinishModalPage, { finishText: finishText, finishComment: finishComment }, { showBackdrop: true, enableBackdropDismiss: false });

View File

@ -358,7 +358,7 @@ export class SellCoinbasePage {
this.processPaymentInfo();
}
public openFinishModal(): void {
private openFinishModal(): void {
let finishText = 'Funds sent to Coinbase Account';
let finishComment = 'The transaction is not yet confirmed, and will show as "Pending" in your Activity. The bitcoin sale will be completed automatically once it is confirmed by Coinbase';
let modal = this.modalCtrl.create(FinishModalPage, { finishText: finishText, finishComment: finishComment }, { showBackdrop: true, enableBackdropDismiss: false });

View File

@ -198,7 +198,7 @@ export class BuyGlideraPage {
this.processPaymentInfo();
}
public openFinishModal(): void {
private openFinishModal(): void {
let finishText = 'Bought';
let finishComment = 'A transfer has been initiated from your bank account. Your bitcoins should arrive to your wallet in 2-4 business day';
let modal = this.modalCtrl.create(FinishModalPage, { finishText: finishText, finishComment: finishComment }, { showBackdrop: true, enableBackdropDismiss: false });

View File

@ -266,7 +266,7 @@ export class SellGlideraPage {
});
}
public openFinishModal(): void {
private openFinishModal(): void {
let finishText = 'Funds sent to Glidera Account';
let finishComment = 'The transaction is not yet confirmed, and will show as "Pending" in your Activity. The bitcoin sale will be completed automatically once it is confirmed by Glidera';
let modal = this.modalCtrl.create(FinishModalPage, { finishText: finishText, finishComment: finishComment }, { showBackdrop: true, enableBackdropDismiss: false });

View File

@ -6,8 +6,8 @@ import * as moment from 'moment';
import { Logger } from '../../../../providers/logger/logger';
// Pages
import { FeeWarningPage } from '../../../send/fee-warning/fee-warning';
import { FinishModalPage } from '../../../finish/finish';
import { FeeWarningPage } from '../../../send/fee-warning/fee-warning';
import { MercadoLibrePage } from '../mercado-libre';
// Provider
@ -400,7 +400,7 @@ export class BuyMercadoLibrePage {
});
}
public openFinishModal(): void {
private openFinishModal(): void {
let finishComment: string;
let cssClass: string;
if (this.mlGiftCard.status == 'FAILURE') {

View File

@ -350,7 +350,7 @@ export class ShapeshiftConfirmPage {
});
};
public openFinishModal(): void {
private openFinishModal(): void {
let finishText = 'Transaction Sent';
let modal = this.modalCtrl.create(FinishModalPage, { finishText: finishText }, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();

View File

@ -183,7 +183,7 @@ export class PaperWalletPage {
});
}
public openFinishModal(): void {
private openFinishModal(): void {
let finishComment = this.translate.instant("Check the transaction on your wallet details");
let finishText = this.translate.instant('Sweep Completed');
let modal = this.modalCtrl.create(FinishModalPage, { finishText: finishText, finishComment: finishComment }, { showBackdrop: true, enableBackdropDismiss: false });

View File

@ -5,8 +5,8 @@ import * as _ from 'lodash';
import { Logger } from '../../../providers/logger/logger';
// Pages
import { PayProPage } from '../../paypro/paypro';
import { FinishModalPage } from '../../finish/finish';
import { PayProPage } from '../../paypro/paypro';
import { ChooseFeeLevelPage } from '../choose-fee-level/choose-fee-level';
import { FeeWarningPage } from '../fee-warning/fee-warning';
@ -609,7 +609,7 @@ export class ConfirmPage {
});
}
public openFinishModal(onlyPublish?: boolean) {
private openFinishModal(onlyPublish?: boolean) {
let params = {};
if (onlyPublish) {
let finishText = this.translate.instant('Payment Published');

View File

@ -307,7 +307,7 @@ export class TxpDetailsPage {
this.viewCtrl.dismiss();
}
public openFinishModal() {
private openFinishModal() {
let modal = this.modalCtrl.create(FinishModalPage, { finishText: this.successText }, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();
modal.onDidDismiss(() => {