Merge branch 'master' of github.com:bitpay/copay into tslint/spree

This commit is contained in:
Jason Dreyzehner 2018-02-20 12:21:12 -05:00
commit ccb3f8e052
26 changed files with 250 additions and 255 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 { SuccessModalPage } from '../pages/success/success';
import { TabsPage } from '../pages/tabs/tabs';
import { TxDetailsPage } from '../pages/tx-details/tx-details';
import { TxpDetailsPage } from '../pages/txp-details/txp-details';
@ -287,7 +287,7 @@ export function createTranslateLoader(http: HttpClient) {
FeePolicyPage,
SessionLogPage,
SendFeedbackPage,
SuccessModalPage,
FinishModalPage,
TourPage,
TabsPage,
TxpDetailsPage,
@ -415,7 +415,7 @@ export function createTranslateLoader(http: HttpClient) {
FeePolicyPage,
SessionLogPage,
SendFeedbackPage,
SuccessModalPage,
FinishModalPage,
TourPage,
TabsPage,
TxpDetailsPage,

View File

@ -4,10 +4,10 @@
<img class="body-img" *ngIf="cssClass == 'success'" src="assets/img/onboarding-success.svg">
<img class="body-img" *ngIf="cssClass != 'success'" src="assets/img/icon-important.svg">
<div class="body-text">
{{successText}}
{{finishText}}
</div>
<div class="body-comment">
{{successComment}}
{{finishComment}}
</div>
</div>
</div>

View File

@ -1,4 +1,4 @@
page-success{
page-finish{
.container {
height: 100%;
position: relative;

View File

@ -3,13 +3,13 @@ import { TranslateService } from '@ngx-translate/core';
import { NavParams, ViewController } from 'ionic-angular';
@Component({
selector: 'page-success',
templateUrl: 'success.html',
selector: 'page-finish',
templateUrl: 'finish.html',
})
export class SuccessModalPage {
export class FinishModalPage {
public successText: string;
public successComment: string;
public finishText: string;
public finishComment: string;
public cssClass: string; // success, warning, danger
constructor(
@ -17,8 +17,8 @@ export class SuccessModalPage {
private navParams: NavParams,
private translate: TranslateService
) {
this.successText = (this.navParams.data.successText || this.navParams.data.successText == '') ? this.navParams.data.successText : this.translate.instant('Payment Sent');
this.successComment = this.navParams.data.successComment ? this.navParams.data.successComment : '';
this.finishText = (this.navParams.data.finishText || this.navParams.data.finishText == '') ? this.navParams.data.finishText : this.translate.instant('Payment Sent');
this.finishComment = this.navParams.data.finishComment ? this.navParams.data.finishComment : '';
this.cssClass = this.navParams.data.cssClass ? this.navParams.data.cssClass : 'success';
}

View File

@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { Component, NgZone } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { Events, ModalController, NavController } from 'ionic-angular';
import { Logger } from '../../providers/logger/logger';
@ -71,6 +71,7 @@ export class HomePage {
private isNW: boolean;
private isWindowsPhoneApp: boolean;
private updatingWalletId: object;
private zone: any;
constructor(
private navCtrl: NavController,
@ -101,14 +102,11 @@ export class HomePage {
this.isWindowsPhoneApp = this.platformProvider.isWP;
this.showReorderBtc = false;
this.showReorderBch = false;
this.zone = new NgZone({ enableLongStackTrace: false });
}
ionViewWillEnter() {
this.config = this.configProvider.get();
this.recentTransactionsEnabled = this.config.recentTransactions.enabled;
if (this.recentTransactionsEnabled) this.getNotifications();
this.pushNotificationsProvider.init();
this.homeIntegrations = this.homeIntegrationsProvider.get();
this.showIntegration = this.config.showIntegration;
@ -119,11 +117,16 @@ export class HomePage {
return homeIntegrations.show == true;
});
// Update Tx Notifications
this.recentTransactionsEnabled = this.config.recentTransactions.enabled;
if (this.recentTransactionsEnabled) this.getNotifications();
// BWS Events: Update Status per Wallet
// NewBlock, NewCopayer, NewAddress, NewTxProposal, TxProposalAcceptedBy, TxProposalRejectedBy, txProposalFinallyRejected,
// txProposalFinallyAccepted, TxProposalRemoved, NewIncomingTx, NewOutgoingTx
this.events.subscribe('bwsEvent', (walletId: string) => {
this.update(walletId);
if (this.recentTransactionsEnabled) this.getNotifications();
this.updateWallet(walletId);
});
// Create, Join, Import and Delete -> Get Wallets -> Update Status for All Wallets
@ -172,11 +175,6 @@ export class HomePage {
}, 10000);
}
private update(walletId: string) {
if (this.recentTransactionsEnabled) this.getNotifications();
this.updateWallet(walletId);
}
private setWallets = _.debounce(() => {
this.wallets = this.profileProvider.getWallets();
this.walletsBtc = this.profileProvider.getWallets({ coin: 'btc' });
@ -239,8 +237,6 @@ export class HomePage {
wallet.status = status;
wallet.error = null;
this.profileProvider.setLastKnownBalance(wallet.id, wallet.status.availableBalanceStr);
// TODO this.setWallets();
this.updateTxps();
this.stopUpdatingWalletId(walletId);
}).catch((err: any) => {
@ -251,8 +247,10 @@ export class HomePage {
private updateTxps = _.debounce(() => {
this.profileProvider.getTxps({ limit: 3 }).then((data: any) => {
this.zone.run(() => {
this.txps = data.txps;
this.txpsN = data.n;
});
}).catch((err: any) => {
this.logger.error(err);
});
@ -262,8 +260,10 @@ export class HomePage {
private getNotifications = _.debounce(() => {
this.profileProvider.getNotifications({ limit: 3 }).then((data: any) => {
this.zone.run(() => {
this.notifications = data.notifications;
this.notificationsN = data.total;
});
}).catch((err: any) => {
this.logger.error(err);
});

View File

@ -6,8 +6,8 @@ import * as moment from 'moment';
import { Logger } from '../../../../providers/logger/logger';
// Pages
import { FinishModalPage } from '../../../finish/finish';
import { FeeWarningPage } from '../../../send/fee-warning/fee-warning';
import { SuccessModalPage } from '../../../success/success';
import { AmazonPage } from '../amazon';
// Provider
@ -308,7 +308,7 @@ export class BuyAmazonPage {
this.onGoingProcessProvider.set('buyingGiftCard', false);
this.logger.debug("Saved new gift card with status: " + newData.status);
this.amazonGiftCard = newData;
this.openSuccessModal();
this.openFinishModal();
});
});
}, 15000, {
@ -412,29 +412,28 @@ export class BuyAmazonPage {
});
}
public openSuccessModal(): void {
let successComment: string;
private openFinishModal(): void {
let finishComment: string;
let cssClass: string;
if (this.amazonGiftCard.status == 'FAILURE') {
successComment = 'Your purchase could not be completed';
finishComment = 'Your purchase could not be completed';
cssClass = 'danger';
}
if (this.amazonGiftCard.status == 'PENDING') {
successComment = 'Your purchase was added to the list of pending';
finishComment = 'Your purchase was added to the list of pending';
cssClass = 'warning';
}
if (this.amazonGiftCard.status == 'SUCCESS') {
successComment = 'Bought ' + this.amountUnitStr;
finishComment = 'Bought ' + this.amountUnitStr;
}
if (this.amazonGiftCard.status == 'SUCCESS') {
successComment = 'Gift card generated and ready to use.';
finishComment = 'Gift card generated and ready to use.';
}
let successText = '';
let modal = this.modalCtrl.create(SuccessModalPage, { successText, successComment, cssClass }, { showBackdrop: true, enableBackdropDismiss: false });
let finishText = '';
let modal = this.modalCtrl.create(FinishModalPage, { finishText, finishComment, cssClass }, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();
modal.onDidDismiss(() => {
this.navCtrl.remove(2, 2);
this.navCtrl.pop();
this.navCtrl.popToRoot({ animate: false });
this.navCtrl.push(AmazonPage, { invoiceId: this.invoiceId });
});
}

View File

@ -5,8 +5,8 @@ import * as _ from 'lodash';
import { Logger } from '../../../../providers/logger/logger';
// Pages
import { FinishModalPage } from '../../../finish/finish';
import { FeeWarningPage } from '../../../send/fee-warning/fee-warning';
import { SuccessModalPage } from '../../../success/success';
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,16 +420,16 @@ export class BitPayCardTopUpPage {
});
}
public openSuccessModal(): void {
let successComment: string;
if (this.sendStatus == 'success') {
if (this.wallet.credentials.m == 1)
successComment = this.translate.instant('Funds were added to debit card');
else
successComment = this.translate.instant('Transaction initiated');
private openFinishModal(): void {
let finishComment: string;
if (this.wallet.credentials.m == 1) {
finishComment = this.translate.instant('Funds were added to debit card');
}
let successText = '';
let modal = this.modalCtrl.create(SuccessModalPage, { successText, successComment }, { showBackdrop: true, enableBackdropDismiss: false });
else {
finishComment = this.translate.instant('Transaction initiated');
}
let finishText = '';
let modal = this.modalCtrl.create(FinishModalPage, { finishText, finishComment }, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();
modal.onDidDismiss(() => {
this.navCtrl.popToRoot({ animate: false });

View File

@ -1,6 +1,7 @@
<ion-header no-border>
<ion-navbar>
<ion-title>BitPay Visa<sup>&reg;</sup> Card ({{lastFourDigits}})</ion-title>
<ion-title>BitPay Visa
<sup>&reg;</sup> Card ({{lastFourDigits}})</ion-title>
</ion-navbar>
</ion-header>
@ -45,9 +46,9 @@
</ion-item-divider>
<ion-item-divider *ngIf="bitpayCardTransactionHistoryConfirming && bitpayCardTransactionHistoryConfirming[0]">
<i class="icon" (click)="bitpayCard.openExternalLink('https://help.bitpay.com/bitpay-card/why-do-you-require-one-blockchain-confirmation-for-bitpay-card-loads')">
<ion-icon (click)="bitpayCard.openExternalLink('https://help.bitpay.com/bitpay-card/why-do-you-require-one-blockchain-confirmation-for-bitpay-card-loads')">
<img src="img/icon-help-support.svg" class="bg" />
</i>
</ion-icon>
<span translate>Confirming</span>
</ion-item-divider>
<ion-list>
@ -57,9 +58,9 @@
</ion-list>
<ion-item-divider *ngIf="bitpayCardTransactionHistoryPreAuth && bitpayCardTransactionHistoryPreAuth[0]">
<i class="icon" (click)="bitpayCard.openExternalLink('https://help.bitpay.com/bitpay-card/why-was-i-overcharged-on-my-bitpay-card-account-why-is-there-a-hold-on-my-account')">
<ion-icon (click)="bitpayCard.openExternalLink('https://help.bitpay.com/bitpay-card/why-was-i-overcharged-on-my-bitpay-card-account-why-is-there-a-hold-on-my-account')">
<img src="img/icon-help-support.svg" class="bg" />
</i>
</ion-icon>
<span translate>Pre-Auth Holds</span>
</ion-item-divider>
<ion-list>

View File

@ -13,7 +13,7 @@ import { TxFormatProvider } from '../../../../providers/tx-format/tx-format';
import { WalletProvider } from '../../../../providers/wallet/wallet';
// pages
import { SuccessModalPage } from '../../../success/success';
import { FinishModalPage } from '../../../finish/finish';
import { CoinbasePage } from '../coinbase';
@Component({
@ -236,7 +236,7 @@ export class BuyCoinbasePage {
this.coinbaseProvider.savePendingTransaction(updatedTx.data, {}, (err: any) => {
this.onGoingProcessProvider.set('buyingBitcoin', false);
if (err) this.logger.debug(err);
this.openSuccessModal();
this.openFinishModal();
});
}).catch((err) => {
this.onGoingProcessProvider.set('buyingBitcoin', false);
@ -292,10 +292,10 @@ export class BuyCoinbasePage {
});
}
public openSuccessModal(): void {
let successText = 'Bought';
let successComment = 'Bitcoin purchase completed. Coinbase has queued the transfer to your selected wallet';
let modal = this.modalCtrl.create(SuccessModalPage, { successText, successComment }, { showBackdrop: true, enableBackdropDismiss: false });
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, finishComment }, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();
modal.onDidDismiss(() => {
this.navCtrl.remove(3, 1);

View File

@ -4,7 +4,7 @@ import * as _ from 'lodash';
import { Logger } from '../../../../providers/logger/logger';
// pages
import { SuccessModalPage } from '../../../success/success';
import { FinishModalPage } from '../../../finish/finish';
import { CoinbasePage } from '../coinbase';
// providers
@ -217,7 +217,7 @@ export class SellCoinbasePage {
ctx.description = this.appProvider.info.nameCase + ' Wallet: ' + this.wallet.name;
this.coinbaseProvider.savePendingTransaction(ctx, null, (err: any) => {
this.onGoingProcessProvider.set('sellingBitcoin', false);
this.openSuccessModal();
this.openFinishModal();
if (err) this.logger.debug(this.coinbaseProvider.getErrorsAsString(err.errors));
});
return;
@ -358,10 +358,10 @@ export class SellCoinbasePage {
this.processPaymentInfo();
}
public openSuccessModal(): void {
let successText = 'Funds sent to Coinbase Account';
let successComment = '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(SuccessModalPage, { successText, successComment }, { showBackdrop: true, enableBackdropDismiss: false });
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, finishComment }, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();
modal.onDidDismiss(() => {
this.navCtrl.remove(3, 1);

View File

@ -3,7 +3,7 @@ import { Events, ModalController, NavController, NavParams } from 'ionic-angular
import { Logger } from '../../../../providers/logger/logger';
// pages
import { SuccessModalPage } from '../../../success/success';
import { FinishModalPage } from '../../../finish/finish';
// providers
import { GlideraProvider } from '../../../../providers/glidera/glidera';
@ -165,7 +165,7 @@ export class BuyGlideraPage {
this.onGoingProcessProvider.set('buyingBitcoin', false);
if (err) return this.showError(err);
this.logger.info(data);
this.openSuccessModal();
this.openFinishModal();
});
}).catch(() => {
this.onGoingProcessProvider.set('buyingBitcoin', false);
@ -198,10 +198,10 @@ export class BuyGlideraPage {
this.processPaymentInfo();
}
public openSuccessModal(): void {
let successText = 'Bought';
let successComment = '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(SuccessModalPage, { successText, successComment }, { showBackdrop: true, enableBackdropDismiss: false });
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, finishComment }, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();
modal.onDidDismiss(() => {
this.navCtrl.remove(3, 1);

View File

@ -4,7 +4,7 @@ import * as _ from 'lodash';
import { Logger } from '../../../../providers/logger/logger';
// pages
import { SuccessModalPage } from '../../../success/success';
import { FinishModalPage } from '../../../finish/finish';
// providers
import { ConfigProvider } from '../../../../providers/config/config';
@ -216,7 +216,7 @@ export class SellGlideraPage {
this.onGoingProcessProvider.set('sellingBitcoin', false);
if (err) return this.showError(err);
this.logger.info(data);
this.openSuccessModal();
this.openFinishModal();
});
}).catch((err) => {
this.onGoingProcessProvider.set('sellingBitcoin', false);
@ -266,10 +266,10 @@ export class SellGlideraPage {
});
}
public openSuccessModal(): void {
let successText = 'Funds sent to Glidera Account';
let successComment = '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(SuccessModalPage, { successText, successComment }, { showBackdrop: true, enableBackdropDismiss: false });
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, finishComment }, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();
modal.onDidDismiss(() => {
this.navCtrl.remove(3, 1);

View File

@ -6,8 +6,8 @@ import * as moment from 'moment';
import { Logger } from '../../../../providers/logger/logger';
// Pages
import { FinishModalPage } from '../../../finish/finish';
import { FeeWarningPage } from '../../../send/fee-warning/fee-warning';
import { SuccessModalPage } from '../../../success/success';
import { MercadoLibrePage } from '../mercado-libre';
// Provider
@ -299,7 +299,7 @@ export class BuyMercadoLibrePage {
this.onGoingProcessProvider.set('Comprando Vale-Presente', false);
this.logger.debug("Saved new gift card with status: " + newData.status);
this.mlGiftCard = newData;
this.openSuccessModal();
this.openFinishModal();
});
});
}, 15000, {
@ -400,26 +400,25 @@ export class BuyMercadoLibrePage {
});
}
public openSuccessModal(): void {
let successComment: string;
private openFinishModal(): void {
let finishComment: string;
let cssClass: string;
if (this.mlGiftCard.status == 'FAILURE') {
successComment = 'Sua compra não pôde ser concluída';
finishComment = 'Sua compra não pôde ser concluída';
cssClass = 'danger';
}
if (this.mlGiftCard.status == 'PENDING') {
successComment = 'Sua compra foi adicionada à lista de pendentes';
finishComment = 'Sua compra foi adicionada à lista de pendentes';
cssClass = 'warning';
}
if (this.mlGiftCard.status == 'SUCCESS' || this.mlGiftCard.cardStatus == 'active') {
successComment = 'Vale-Presente gerado e pronto para usar';
finishComment = 'Vale-Presente gerado e pronto para usar';
}
let successText = '';
let modal = this.modalCtrl.create(SuccessModalPage, { successText, successComment, cssClass }, { showBackdrop: true, enableBackdropDismiss: false });
let finishText = '';
let modal = this.modalCtrl.create(FinishModalPage, { finishText, finishComment, cssClass }, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();
modal.onDidDismiss(() => {
this.navCtrl.remove(2, 2);
this.navCtrl.pop();
this.navCtrl.popToRoot({ animate: false });
this.navCtrl.push(MercadoLibrePage, { invoiceId: this.invoiceId });
});
}

View File

@ -6,7 +6,7 @@ import * as moment from 'moment';
import { Logger } from '../../../../providers/logger/logger';
// Pages
import { SuccessModalPage } from '../../../success/success';
import { FinishModalPage } from '../../../finish/finish';
import { ShapeshiftPage } from '../shapeshift';
// Providers
@ -201,7 +201,7 @@ export class ShapeshiftConfirmPage {
this.shapeshiftProvider.saveShapeshift(newData, null, (err: any) => {
this.logger.debug("Saved shift with status: " + newData.status);
this.openSuccessModal();
this.openFinishModal();
});
});
}
@ -350,9 +350,9 @@ export class ShapeshiftConfirmPage {
});
};
public openSuccessModal(): void {
let successText = 'Transaction Sent';
let modal = this.modalCtrl.create(SuccessModalPage, { successText }, { showBackdrop: true, enableBackdropDismiss: false });
private openFinishModal(): void {
let finishText = 'Transaction Sent';
let modal = this.modalCtrl.create(FinishModalPage, { finishText }, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();
modal.onDidDismiss(() => {
this.navCtrl.popToRoot({ animate: false });

View File

@ -11,7 +11,7 @@ import { OnGoingProcessProvider } from '../../providers/on-going-process/on-goin
import { PopupProvider } from '../../providers/popup/popup';
import { ProfileProvider } from '../../providers/profile/profile';
import { WalletProvider } from '../../providers/wallet/wallet';
import { SuccessModalPage } from '../success/success';
import { FinishModalPage } from '../finish/finish';
@Component({
selector: 'page-paper-wallet',
@ -163,7 +163,7 @@ export class PaperWalletPage {
this._sweepWallet().then((data: any) => {
this.onGoingProcessProvider.set('sweepingWallet', false);
this.logger.debug('Success sweep. Destination address:' + data.destinationAddress + ' - transaction id: ' + data.txid);
this.openSuccessModal();
this.openFinishModal();
}).catch((err: any) => {
this.logger.error(err);
this.popupProvider.ionicAlert(this.translate.instant('Error sweeping wallet:'), err || err.toString());
@ -183,10 +183,10 @@ export class PaperWalletPage {
});
}
public openSuccessModal(): void {
let successComment = this.translate.instant("Check the transaction on your wallet details");
let successText = this.translate.instant('Sweep Completed');
let modal = this.modalCtrl.create(SuccessModalPage, { successText, successComment }, { showBackdrop: true, enableBackdropDismiss: false });
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, finishComment }, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();
modal.onDidDismiss(() => {
this.navCtrl.pop();

View File

@ -122,6 +122,5 @@
</ion-content>
<ion-footer>
<button ion-button full class="button-footer" (click)="approve(tx, wallet)" [disabled]="!wallet || noWalletMessage || critialError || !tx.txp[wallet.id]"
translate>Click to send</button>
<button ion-button full class="button-footer" (click)="approve(tx, wallet)" [disabled]="!wallet || noWalletMessage || critialError || !tx.txp[wallet.id]">{{buttonText}}</button>
</ion-footer>

View File

@ -5,8 +5,8 @@ import * as _ from 'lodash';
import { Logger } from '../../../providers/logger/logger';
// Pages
import { FinishModalPage } from '../../finish/finish';
import { PayProPage } from '../../paypro/paypro';
import { SuccessModalPage } from '../../success/success';
import { ChooseFeeLevelPage } from '../choose-fee-level/choose-fee-level';
import { FeeWarningPage } from '../fee-warning/fee-warning';
@ -253,23 +253,23 @@ export class ConfirmPage {
private setButtonText(isMultisig: boolean, isPayPro: boolean): void {
if (isPayPro) {
if (this.isCordova && !this.isWindowsPhoneApp) {
this.buttonText = this.translate.instant('Slide to pay');
} else {
// if (this.isCordova && !this.isWindowsPhoneApp) {
// this.buttonText = this.translate.instant('Slide to pay');
// } else {
this.buttonText = this.translate.instant('Click to pay');
}
// }
} else if (isMultisig) {
if (this.isCordova && !this.isWindowsPhoneApp) {
this.buttonText = this.translate.instant('Slide to accept');
} else {
// if (this.isCordova && !this.isWindowsPhoneApp) {
// this.buttonText = this.translate.instant('Slide to accept');
// } else {
this.buttonText = this.translate.instant('Click to accept');
}
} else {
if (this.isCordova && !this.isWindowsPhoneApp) {
this.buttonText = this.translate.instant('Slide to send');
// }
} else {
// if (this.isCordova && !this.isWindowsPhoneApp) {
// this.buttonText = this.translate.instant('Slide to send');
// } else {
this.buttonText = this.translate.instant('Click to send');
}
// }
}
}
@ -573,8 +573,10 @@ export class ConfirmPage {
if (!wallet.canSign() && !wallet.isPrivKeyExternal()) {
this.logger.info('No signing proposal: No private key');
this.walletProvider.onlyPublish(wallet, txp).then(() => {
this.openSuccessModal(true);
this.onGoingProcessProvider.clear();
this.openFinishModal(true);
}).catch((err: any) => {
this.onGoingProcessProvider.clear();
this.setSendError(err);
});
return;
@ -586,7 +588,7 @@ export class ConfirmPage {
txid: txp.txid
});
}
this.openSuccessModal();
this.openFinishModal();
}).catch((err: any) => {
this.setSendError(err);
return;
@ -595,28 +597,26 @@ export class ConfirmPage {
confirmTx().then((nok: boolean) => {
if (nok) {
this.onGoingProcessProvider.clear();
return;
}
publishAndSign();
}).catch((err: any) => {
this.logger.warn(err);
return;
});
}).catch((err: any) => {
this.onGoingProcessProvider.set('creatingTx', false);
this.onGoingProcessProvider.clear();
this.logger.warn(err);
return;
});
}
public openSuccessModal(onlyPublish?: boolean) {
private openFinishModal(onlyPublish?: boolean) {
let params = {};
if (onlyPublish) {
let successText = this.translate.instant('Payment Published');
let successComment = this.translate.instant('You could sign the transaction later in your wallet details');
params = { successText, successComment };
let finishText = this.translate.instant('Payment Published');
let finishComment = this.translate.instant('You could sign the transaction later in your wallet details');
params = { finishText, finishComment };
}
let modal = this.modalCtrl.create(SuccessModalPage, params, { showBackdrop: true, enableBackdropDismiss: false });
let modal = this.modalCtrl.create(FinishModalPage, params, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();
modal.onDidDismiss(() => {
this.navCtrl.popToRoot({ animate: false }).then(() => {

View File

@ -14,9 +14,9 @@
<ion-content>
<div class="zero-state" *ngIf="isEmptyList">
<i class="icon zero-state-icon">
<ion-icon class="zero-state-icon">
<img class="svg" src="assets/img/address-book-add.svg" />
</i>
</ion-icon>
<div class="zero-state-heading" translate>No contacts yet</div>
<div class="zero-state-description" translate>Get started by adding your first one.</div>
<div class="bottom-absolute">

View File

@ -11,63 +11,54 @@
<ion-note item-end>
{{walletName}}
</ion-note>
<i class="icon bp-arrow-right"></i>
</ion-item>
<ion-item>
<h2 translate>Coin</h2>
<ion-note item-end>
{{coin}}
</ion-note>
<i class="icon bp-arrow-right"></i>
</ion-item>
<ion-item copy-to-clipboard="{{walletId}}">
<h2 translate>Wallet Id</h2>
<p>
{{walletId}}
</p>
<i class="icon bp-arrow-right"></i>
</ion-item>
<ion-item>
<h2 translate>Wallet Configuration (m-n)</h2>
<ion-note item-end>
{{M}}-{{N}}
</ion-note>
<i class="icon bp-arrow-right"></i>
</ion-item>
<ion-item>
<h2 translate>Wallet Network</h2>
<ion-note item-end>
{{network}}
</ion-note>
<i class="icon bp-arrow-right"></i>
</ion-item>
<ion-item>
<h2 translate>Address Type</h2>
<ion-note item-end>
{{addressType}}
</ion-note>
<i class="icon bp-arrow-right"></i>
</ion-item>
<ion-item>
<h2 translate>Derivation Strategy</h2>
<ion-note item-end>
{{derivationStrategy}}
</ion-note>
<i class="icon bp-arrow-right"></i>
</ion-item>
<ion-item *ngIf="!canSign">
<h2></h2>
<ion-note item-end>
<span translate>No private key</span>
</ion-note>
<i class="icon bp-arrow-right"></i>
</ion-item>
<ion-item>
<h2 translate>Account</h2>({{derivationStrategy}})
<ion-note item-end>
#{{account}}
</ion-note>
<i class="icon bp-arrow-right"></i>
</ion-item>
<ion-item-divider *ngIf="copayers">Copayers</ion-item-divider>
<ion-item *ngFor="let copayer of copayers">
@ -75,7 +66,6 @@
<ion-note *ngIf="copayer.id == copayerId" item-end>
({{'Me' | translate}})
</ion-note>
<i class="icon bp-arrow-right"></i>
</ion-item>
<ion-item-divider translate>Extended Public Keys</ion-item-divider>
<ion-item *ngFor="let pk of pubKeys" copy-to-clipboard="{{pk}}">
@ -84,13 +74,11 @@
{{pk}}
</ion-note>
<span *ngIf="$index == 0">({{basePath}})</span>
<i class="icon bp-arrow-right"></i>
</ion-item>
<div *ngIf="!needsBackup && canSign">
<ion-item-divider></ion-item-divider>
<button ion-item (click)="openWalletExtendedPrivateKey()">
<h2 translate>Extended Private Key</h2>
<i class="icon bp-arrow-right"></i>
</button>
</div>
<ion-item-divider *ngIf="balanceByAddress">Balance By Address</ion-item-divider>

View File

@ -36,8 +36,8 @@
</div>
<ion-list *ngIf="btx">
<ion-item-divider *ngIf="btx.action === 'sent'">{{'To' | translate}}</ion-item-divider>
<ion-item *ngIf="btx.action === 'sent'">
<span class="label" translate>To</span>
<span class="payment-proposal-to">
<img class="icon-bitcoin" *ngIf="!cardId" src="assets/img/icon-bitcoin-small.svg">
<img class="icon-bitcoin" *ngIf="cardId" src="assets/img/icon-card.svg" width="34">
@ -48,20 +48,18 @@
</span>
</ion-item>
<ion-item-divider *ngIf="btx.action === 'sent'">{{'From' | translate}}</ion-item-divider>
<ion-item-divider *ngIf="btx.action !== 'sent'">{{'To' | translate}}</ion-item-divider>
<ion-item>
<span class="label" *ngIf="btx.action === 'sent'" translate>From</span>
<span class="label" *ngIf="btx.action !== 'sent'" translate>To</span>
<div class="wallet">
<ion-icon item-start>
<img *ngIf="wallet.network == 'testnet'" [ngStyle]="{'background-color': wallet.color}" src="assets/img/icon-wallet-testnet.svg"
class="icon-wallet" />
<img *ngIf="wallet.network != 'testnet'" [ngStyle]="{'background-color': wallet.color}" src="assets/img/icon-wallet.svg"
class="icon-wallet" />
</ion-icon>
<div class="wallet" *ngIf="wallet">
<img *ngIf="wallet.network == 'testnet'" [ngStyle]="{'background-color': wallet.color}" src="assets/img/icon-wallet-testnet.svg" class="icon-wallet" />
<img *ngIf="wallet.network != 'testnet'" [ngStyle]="{'background-color': wallet.color}" src="assets/img/icon-wallet.svg" class="icon-wallet" />
<div>{{wallet.name}}</div>
</div>
</ion-item>
<ion-item-divider></ion-item-divider>
<ion-item *ngIf="btx.action != 'received' && isShared">
<ion-label translate>Created by</ion-label>
<ion-note item-end>
@ -76,16 +74,10 @@
</ion-note>
</ion-item>
<button ion-item (click)="showCommentPopup()">
<ion-label>{{'Memo' | translate}}</ion-label>
<ion-note item-end>
<span *ngIf="btx.note && btx.note.body">{{btx.note.body}}</span>
<span *ngIf="(!btx.note || !btx.note.body) && btx.message">{{btx.message}}</span>
</ion-note>
</button>
<ion-item *ngIf="btx.action != 'received'">
<ion-label>{{'Fee' | translate}}</ion-label>
<ion-label>
<div class="item-title">{{'Fee' | translate}}</div>
</ion-label>
<ion-note item-end>
<span>{{btx.feeStr}}</span>
<div>
@ -124,6 +116,22 @@
</ion-note>
</ion-item>
<ion-item-divider>
<div item-start>
{{'Memo' | translate}}
</div>
<div item-end>
<button ion-button clear icon-only color="grey" (click)="showCommentPopup()">
<ion-icon *ngIf="(!btx.note || !btx.note.body) && !btx.message" name="add"></ion-icon>
<span *ngIf="(btx.note && btx.note.body) || btx.message">{{'Edit' | translate}}</span>
</button>
</div>
</ion-item-divider>
<ion-item *ngIf="(btx.note && btx.note.body) || btx.message" text-wrap>
<span *ngIf="btx.note && btx.note.body">{{btx.note.body}}</span>
<span *ngIf="(!btx.note || !btx.note.body) && btx.message">{{btx.message}}</span>
</ion-item>
<ion-item *ngIf="txsUnsubscribedForNotifications">
<ion-label>{{'Notify me if confirmed' | translate}}</ion-label>
<ion-toggle checked="false" *ngIf="!btx.confirmations || btx.confirmations == 0" [(ngModel)]="txNotification.value" (ionChange)="txConfirmNotificationChange()"></ion-toggle>
@ -150,11 +158,9 @@
</div>
</div>
<div *ngIf="btx">
<ion-item-divider></ion-item-divider>
<ion-item-divider *ngIf="(btx.note && btx.note.body) || btx.message"></ion-item-divider>
<button ion-item class="btn-view" (click)="viewOnBlockchain()" translate>View on blockchain</button>
<ion-item-divider></ion-item-divider>
</div>
</ion-list>

View File

@ -3,9 +3,11 @@ page-tx-details {
$item-lateral-padding: 20px;
$item-label-color: #6C6C6E;
span.label {
color: color($colors, grey);
// Small font size for ion-note
ion-note {
font-size: 1.3rem;
}
.sending-label {
display: flex;
align-items: center;
@ -32,9 +34,10 @@ page-tx-details {
}
.payment-proposal-to, .wallet {
color: color($colors, grey);
font-size: 1.4rem;
display: flex;
align-items: center;
margin-top: 1rem;
.icon-wallet {
width: 25px;
height: 25px;
@ -44,7 +47,7 @@ page-tx-details {
}
}
.icon-bitcoin {
margin: 9px 2rem 9px 0;
margin: 0 9px 0 0;
width: 25px;
height: 25px;
padding: 5px;

View File

@ -203,7 +203,7 @@ export class TxDetailsPage {
};
this.walletProvider.editTxNote(this.wallet, args).then((res: any) => {
this.logger.info('Tx Note edited: ', res);
this.logger.info('Tx Note edited');
}).catch((err: any) => {
this.logger.debug('Could not save tx comment ' + err);
});

View File

@ -24,49 +24,49 @@
</div>
</div>
<ion-item *ngIf="tx.removed" text-wrap>
<ion-item *ngIf="tx && tx.removed" text-wrap>
<span translate>The payment was removed by creator</span>
</ion-item>
<div *ngIf="tx.status != 'pending'">
<div *ngIf="tx.status == 'accepted' && !tx.isGlidera">
<div *ngIf="tx && tx.status != 'pending'">
<div *ngIf="tx && tx.status == 'accepted' && !tx.isGlidera">
<ion-item text-wrap translate>Payment accepted, but not yet broadcasted</ion-item>
<button ion-item class="btn-broadcast" icon-left (click)="broadcast(tx)" [disabled]="loading">
<ion-icon name="cloud-upload"></ion-icon>
<span translate>Broadcast Payment</span>
</button>
</div>
<ion-item *ngIf="tx.status == 'accepted' && tx.isGlidera" text-wrap>
<ion-item *ngIf="tx && tx.status == 'accepted' && tx.isGlidera" text-wrap>
<span translate>Payment accepted. It will be broadcasted by Glidera. In case there is a problem, it can be deleted 6 hours after it
was created.</span>
</ion-item>
<ion-item *ngIf="tx.status == 'broadcasted'" text-wrap translate>Payment Sent</ion-item>
<ion-item *ngIf="tx.status =='rejected'" text-wrap translate>Payment Rejected</ion-item>
<ion-item *ngIf="tx && tx.status == 'broadcasted'" text-wrap translate>Payment Sent</ion-item>
<ion-item *ngIf="tx && tx.status =='rejected'" text-wrap translate>Payment Rejected</ion-item>
</div>
<ion-item *ngIf="!currentSpendUnconfirmed && tx.hasUnconfirmedInputs">
<ion-item *ngIf="!currentSpendUnconfirmed && tx && tx.hasUnconfirmedInputs">
<span translate>Warning: this transaction has unconfirmed inputs</span>
</ion-item>
<ion-list>
<ion-item-divider>{{'To' | translate}}</ion-item-divider>
<ion-item class="container-to">
<span class="label" translate>To</span>
<div class="payment-proposal-to" copy-to-clipboard="{{tx.toAddress}}">
<img class="icon-bitcoin" src="assets/img/icon-bitcoin-small.svg" />
<!-- <contact ng-if="!tx.hasMultiplesOutputs" class="ellipsis" address="{{tx.toAddress}}"></contact> TODO -->
<span *ngIf="!tx.name">{{tx.toAddress}}</span>
<span *ngIf="tx.name">{{tx.name}}</span>
<span *ngIf="tx.hasMultiplesOutputs" translate>Multiple recipients</span>
<span *ngIf="tx && !tx.name">{{tx.toAddress}}</span>
<span *ngIf="tx && tx.name">{{tx.name}}</span>
<span *ngIf="tx && tx.hasMultiplesOutputs" translate>Multiple recipients</span>
</div>
<div *ngIf="tx.hasMultiplesOutputs" (click)="showMultiplesOutputs = !showMultiplesOutputs">
<div *ngIf="tx && tx.hasMultiplesOutputs" (click)="showMultiplesOutputs = !showMultiplesOutputs">
<span translate>Recipients</span>
<span>{{tx.recipientCount}}
<ion-icon name="arrow-up"></ion-icon>
</span>
</div>
<div *ngIf="tx.hasMultiplesOutputs && showMultiplesOutputs">
<div *ngIf="tx && tx.hasMultiplesOutputs && showMultiplesOutputs">
<div *ngFor="let output of tx.outputs">
<div class="item" copy-to-clipboard="{{output.toAddress}}">
<span translate>To</span>:
@ -88,16 +88,15 @@
</div>
</ion-item>
<ion-item-divider>{{'From' | translate}}</ion-item-divider>
<ion-item class="container-from">
<span class="label" translate>From</span>
<div>
<div class="wallet" *ngIf="wallet">
<img class="icon-wallet" src="assets/img/icon-wallet.svg" />
<div>{{wallet.name}}</div>
</div>
</div>
</ion-item>
<ion-item-divider></ion-item-divider>
<ion-item *ngIf="isShared">
<ion-label>
<span translate>Created by</span>
@ -107,7 +106,7 @@
</ion-note>
</ion-item>
<ion-item *ngIf="tx.ts || tx.createdOn">
<ion-item *ngIf="tx && tx.ts || tx.createdOn">
<ion-label>
<span translate>Date</span>
</ion-label>
@ -116,18 +115,18 @@
</ion-note>
</ion-item>
<ion-item *ngIf="tx.message">
<ion-label>
<span translate>Memo</span>
</ion-label>
<ion-note item-end>
<div *ngIf="tx && tx.message">
<ion-item-divider>{{'Memo' | translate}}</ion-item-divider>
<ion-item text-wrap>
{{tx.message}}
</ion-note>
</ion-item>
<ion-item-divider></ion-item-divider>
</div>
<ion-item>
<ion-item *ngIf="tx && tx.feeStr">
<ion-label>
<span>{{'Fee' | translate}} ({{tx.feeLevelStr | translate}})</span>
<div class="item-title">{{'Fee' | translate}}</div>
<div class="item-subtitle">{{tx.feelevelstr | translate}}</div>
</ion-label>
<ion-note item-end>
<span>{{tx.feeStr}}</span>
@ -143,11 +142,14 @@
<ion-label>
{{'To'|translate}}
</ion-label>
<ion-note item-end>
<span *ngIf="tx.merchant && tx.merchant.pr.ca">
<i class="fi-lock"></i> {{tx.paypro.domain}}</span>
<span *ngIf="tx.merchant && !tx.merchant.pr.ca">
<i class="fi-unlock"></i> {{tx.paypro.domain}}</span>
<ion-note icon-start item-end>
<span *ngIf="tx.paypro.merchant && tx.paypro.merchant.caTrusted">
<ion-icon name="lock"></ion-icon>
</span>
<span *ngIf="tx.paypro.merchant && !tx.paypro.merchant.caTrusted">
<ion-icon name="unlock"></ion-icon>
</span>
<span>{{tx.paypro.domain}}</span>
</ion-note>
<!-- <contact address="{{tx.toAddress}}" ng-hide="tx.merchant"></contact> -->
</ion-item>
@ -167,13 +169,9 @@
<time>{{expires}}</time>
</ion-note>
</ion-item>
<ion-item>
<ion-label>
{{'Merchant Message'|translate}}
</ion-label>
<ion-note *ngIf="tx.paypro.pr && tx.paypro.pr.pd" item-end>
{{tx.paypro.pr.pd.memo}}
</ion-note>
<ion-item-divider *ngIf="tx.paypro.memo">{{'Merchant Message' | translate}}</ion-item-divider>
<ion-item *ngIf="tx.paypro.memo" text-wrap>
{{tx.paypro.memo}}
</ion-item>
</div>
@ -197,13 +195,13 @@
</div>
</div>
<div *ngIf="tx.canBeRemoved || (tx.status == 'accepted' && !tx.broadcastedOn)">
<div *ngIf="(tx && tx.canBeRemoved) || (tx && tx.status == 'accepted' && !tx.broadcastedOn)">
<div class="proposal-deletion-help" *ngIf="!tx.isGlidera && isShared" translate>
* A payment proposal can be deleted if 1) you are the creator, and no other copayer has signed, or 2) 24 hours have passed
since the proposal was created.
</div>
<ion-item-divider></ion-item-divider>
<button ion-item icon-left class="btn-remove" (click)="remove()" [disabled]="loading">
<button ion-item icon-left text-center class="btn-remove" (click)="remove()" [disabled]="loading">
<ion-icon name="trash"></ion-icon>
<span translate>Delete Payment Proposal</span>
</button>
@ -212,7 +210,7 @@
</ion-list>
</ion-content>
<ion-footer *ngIf="(isShared && tx.pendingForUs) || (tx.pendingForUs && canSign && !paymentExpired)">
<ion-footer *ngIf="(isShared && tx && tx.pendingForUs) || (tx && tx.pendingForUs && canSign && !paymentExpired)">
<ion-toolbar>
<ion-buttons left>
<button ion-button icon-left (click)="reject()" [disabled]="loading" color="warning" *ngIf="isShared && tx.pendingForUs">
@ -221,7 +219,7 @@
</button>
</ion-buttons>
<ion-buttons right>
<button *ngIf="tx.pendingForUs && canSign && !paymentExpired" color="blank" ion-button icon-right (click)="onConfirm()">
<button *ngIf="tx && tx.pendingForUs && canSign && !paymentExpired" color="blank" ion-button icon-right (click)="onConfirm()">
{{buttonText}}
<ion-icon name="send"></ion-icon>
</button>

View File

@ -2,9 +2,11 @@ page-txp-details {
$item-border-color: #EFEFEF;
$item-lateral-padding: 20px;
span.label {
color: color($colors, grey);
// Small font size for ion-note
ion-note {
font-size: 1.3rem;
}
.sending-label {
display: flex;
align-items: center;
@ -38,9 +40,10 @@ page-txp-details {
.container-to, .container-from {
.wallet, .payment-proposal-to {
color: color($colors, grey);
font-size: 1.4rem;
display: flex;
align-items: center;
margin-top: 1rem;
.icon-wallet {
width: 25px;
height: 25px;
@ -50,7 +53,7 @@ page-txp-details {
}
}
.icon-bitcoin {
margin: 9px 12px 9px 0;
margin: 0 9px 0 0;
width: 25px;
height: 25px;
padding: 5px;
@ -138,6 +141,7 @@ page-txp-details {
}
}
.btn-remove {
font-size: 1.2rem;
color: color($colors, danger);
}
.btn-broadcast {

View File

@ -14,7 +14,7 @@ import { TxFormatProvider } from '../../providers/tx-format/tx-format';
import { WalletProvider } from '../../providers/wallet/wallet';
// pages
import { SuccessModalPage } from '../success/success';
import { FinishModalPage } from '../finish/finish';
import * as _ from 'lodash';
@ -120,18 +120,18 @@ export class TxpDetailsPage {
}).length == this.tx.requiredSignatures - 1;
if (lastSigner) {
if (this.isCordova && !this.isWindowsPhoneApp) {
this.buttonText = this.translate.instant('Slide to send');
} else {
// if (this.isCordova && !this.isWindowsPhoneApp) {
// this.buttonText = this.translate.instant('Slide to send');
// } else {
this.buttonText = this.translate.instant('Click to send');
}
// }
this.successText = this.translate.instant('Payment Sent');
} else {
if (this.isCordova && !this.isWindowsPhoneApp) {
this.buttonText = this.translate.instant('Slide to accept');
} else {
// if (this.isCordova && !this.isWindowsPhoneApp) {
// this.buttonText = this.translate.instant('Slide to accept');
// } else {
this.buttonText = this.translate.instant('Click to accept');
}
// }
this.successText = this.translate.instant('Payment Accepted');
}
}
@ -212,7 +212,7 @@ export class TxpDetailsPage {
public sign(): void {
this.loading = true;
this.walletProvider.publishAndSign(this.wallet, this.tx).then((txp: any) => {
this.openSuccessModal();
this.openFinishModal();
}).catch((err: any) => {
this.setError(err, ('Could not send payment'));
});
@ -255,7 +255,7 @@ export class TxpDetailsPage {
this.onGoingProcessProvider.set('broadcastingTx', true);
this.walletProvider.broadcastTx(this.wallet, this.tx).then((txpb: any) => {
this.onGoingProcessProvider.set('broadcastingTx', false);
this.openSuccessModal();
this.openFinishModal();
}).catch((err: any) => {
this.onGoingProcessProvider.set('broadcastingTx', false);
this.setError(err, 'Could not broadcast payment');
@ -307,8 +307,8 @@ export class TxpDetailsPage {
this.viewCtrl.dismiss();
}
public openSuccessModal() {
let modal = this.modalCtrl.create(SuccessModalPage, {}, { showBackdrop: true, enableBackdropDismiss: false });
private openFinishModal() {
let modal = this.modalCtrl.create(FinishModalPage, { finishText: this.successText }, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();
modal.onDidDismiss(() => {
this.close();

View File

@ -1159,11 +1159,9 @@ export class WalletProvider {
this.ongoingProcessProvider.set('sendingTx', true);
this.publishTx(wallet, txp).then((publishedTxp) => {
this.invalidateCache(wallet);
this.ongoingProcessProvider.set('sendingTx', false);
this.events.publish('Local/TxAction', wallet.id);
return resolve();
}).catch((err) => {
this.ongoingProcessProvider.set('sendingTx', false);
return reject(this.bwcErrorProvider.msg(err));
});
});
@ -1225,6 +1223,7 @@ export class WalletProvider {
return reject(err);
});
}).catch((err) => {
this.ongoingProcessProvider.clear();
return reject(this.bwcErrorProvider.msg(err));
});
} else {
@ -1241,6 +1240,7 @@ export class WalletProvider {
return reject(this.bwcErrorProvider.msg(err));
});
}).catch((err) => {
this.ongoingProcessProvider.clear();
return reject(this.bwcErrorProvider.msg(err));
});
};