From f1fee49cabd3d40c05284d6aad831bea9e099554 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Mon, 30 Mar 2020 16:23:05 -0300 Subject: [PATCH] fix(coinbase): finish view on iOS. Select crypto as default on amount view. Removed arrows on iOS account list --- .../coinbase-account/coinbase-account.ts | 4 +-- .../coinbase-withdraw/coinbase-withdraw.ts | 32 ++++++++++++++----- src/pages/send/amount/amount.ts | 7 +++- src/pages/wallets/wallets.html | 2 +- src/pages/wallets/wallets.ts | 2 +- src/providers/coinbase/coinbase.ts | 1 + 6 files changed, 35 insertions(+), 13 deletions(-) diff --git a/src/pages/integrations/coinbase/coinbase-account/coinbase-account.ts b/src/pages/integrations/coinbase/coinbase-account/coinbase-account.ts index 91d5510f1ac..e25e2111953 100644 --- a/src/pages/integrations/coinbase/coinbase-account/coinbase-account.ts +++ b/src/pages/integrations/coinbase/coinbase-account/coinbase-account.ts @@ -174,7 +174,7 @@ export class CoinbaseAccountPage { } this.onGoingProcessProvider.clear(); this.navCtrl.push(AmountPage, { - currency: this.nativeCurrency, + alternativeCurrency: this.nativeCurrency, coin, walletId: fromWallet.id, fromWalletDetails: true, @@ -217,7 +217,7 @@ export class CoinbaseAccountPage { this.navCtrl.push(AmountPage, { id: this.id, toWalletId: toWallet.id, - currency: this.nativeCurrency, + alternativeCurrency: this.nativeCurrency, coin, nextPage: 'CoinbaseWithdrawPage', description: diff --git a/src/pages/integrations/coinbase/coinbase-withdraw/coinbase-withdraw.ts b/src/pages/integrations/coinbase/coinbase-withdraw/coinbase-withdraw.ts index 39e866a7e3f..6b2e5f0ce85 100644 --- a/src/pages/integrations/coinbase/coinbase-withdraw/coinbase-withdraw.ts +++ b/src/pages/integrations/coinbase/coinbase-withdraw/coinbase-withdraw.ts @@ -26,6 +26,7 @@ export class CoinbaseWithdrawPage { private accountId: string; + public hideSlideButton: boolean; public data: object = {}; public amount: string; public currency: string; @@ -53,6 +54,7 @@ export class CoinbaseWithdrawPage { private walletProvider: WalletProvider ) { this.isCordova = this.platformProvider.isCordova; + this.hideSlideButton = false; this.amount = this.navParams.data.amount; this.currency = this.navParams.data.currency; @@ -72,6 +74,16 @@ export class CoinbaseWithdrawPage { ionViewDidLoad() { this.logger.info('Loaded: CoinbaseWithdrawPage'); + this.navCtrl.swipeBackEnabled = false; + if (this.isCordova) { + window.addEventListener('keyboardWillShow', () => { + this.hideSlideButton = true; + }); + + window.addEventListener('keyboardWillHide', () => { + this.hideSlideButton = false; + }); + } } ionViewWillLeave() { @@ -154,23 +166,27 @@ export class CoinbaseWithdrawPage { }); } - private openFinishModal(): void { - let finishText = this.translate.instant('Withdraw success'); - let finishComment = this.translate.instant( + public openFinishModal() { + const finishText = this.translate.instant('Withdraw success'); + const finishComment = this.translate.instant( 'It could take a while to confirm transaction' ); - let modal = this.modalCtrl.create( + const modal = this.modalCtrl.create( FinishModalPage, { finishText, finishComment }, { showBackdrop: true, enableBackdropDismiss: false } ); modal.present(); modal.onDidDismiss(_ => { - this.navCtrl.popToRoot().then(_ => { + this.navCtrl.popToRoot({ animate: false }).then(_ => { this.navCtrl.parent.select(1); - this.navCtrl.push(CoinbaseAccountPage, { - id: this.accountId - }); + this.navCtrl.push( + CoinbaseAccountPage, + { + id: this.accountId + }, + { animate: false } + ); }); }); } diff --git a/src/pages/send/amount/amount.ts b/src/pages/send/amount/amount.ts index e46e8bd57a4..03c6cd3cba8 100644 --- a/src/pages/send/amount/amount.ts +++ b/src/pages/send/amount/amount.ts @@ -93,6 +93,7 @@ export class AmountPage { public cardConfig: CardConfig; private fromCoinbase; + private alternativeCurrency; @ViewChild(Navbar) navBar: Navbar; @@ -132,6 +133,7 @@ export class AmountPage { ? this.navParams.data.onlyIntegers : false; this.fromCoinbase = this.navParams.data.fromCoinbase; + this.alternativeCurrency = this.navParams.data.alternativeCurrency; this.showSendMax = false; this.useSendMax = false; @@ -279,7 +281,10 @@ export class AmountPage { this.altUnitIndex = this.unitIndex; this.unitIndex = this.availableUnits.length; } else { - this.fiatCode = this.config.wallet.settings.alternativeIsoCode || 'USD'; + this.fiatCode = + this.alternativeCurrency || + this.config.wallet.settings.alternativeIsoCode || + 'USD'; fiatName = this.config.wallet.settings.alternativeName || this.fiatCode; this.altUnitIndex = this.availableUnits.length; } diff --git a/src/pages/wallets/wallets.html b/src/pages/wallets/wallets.html index 558e1c2012d..0e413805ad4 100644 --- a/src/pages/wallets/wallets.html +++ b/src/pages/wallets/wallets.html @@ -119,7 +119,7 @@
Loading accounts...
-