From e32bb328ad31619f56b8e2e3d2bf189505d9b804 Mon Sep 17 00:00:00 2001 From: johnathan White Date: Wed, 1 Sep 2021 09:10:16 -0400 Subject: [PATCH 1/3] removed nav check --- src/pages/exchange-crypto/exchange-crypto.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/pages/exchange-crypto/exchange-crypto.ts b/src/pages/exchange-crypto/exchange-crypto.ts index 35e75f9988d..ac182b8ab60 100644 --- a/src/pages/exchange-crypto/exchange-crypto.ts +++ b/src/pages/exchange-crypto/exchange-crypto.ts @@ -1245,24 +1245,7 @@ export class ExchangeCryptoPage { } private checkConfirmation(ms: number) { - const currentIndex = this.navCtrl.getActive().index; - const currentView = this.navCtrl.getViews(); - - if ( - this.fromWalletSelected && - [ - 'ExchangeCryptoPage', - 'ExchangeCryptoSettingsPage', - 'OneInchPage' - ].includes(currentView[currentIndex].name) - ) { - this.timeout = setTimeout( - () => { - this.verifyAllowances(); - }, - ms ? ms : 15000 - ); - } + this.timeout = setTimeout(() => this.verifyAllowances(), ms || 15000); } private verifyAllowances() { From 12f44d7a82433a091f83cebd45b25c486ec48517 Mon Sep 17 00:00:00 2001 From: johnathan White Date: Wed, 1 Sep 2021 09:21:15 -0400 Subject: [PATCH 2/3] added debug --- src/pages/exchange-crypto/exchange-crypto.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/exchange-crypto/exchange-crypto.ts b/src/pages/exchange-crypto/exchange-crypto.ts index ac182b8ab60..01d6efa754f 100644 --- a/src/pages/exchange-crypto/exchange-crypto.ts +++ b/src/pages/exchange-crypto/exchange-crypto.ts @@ -1245,6 +1245,7 @@ export class ExchangeCryptoPage { } private checkConfirmation(ms: number) { + this.logger.debug('Swap - checking confirmation'); this.timeout = setTimeout(() => this.verifyAllowances(), ms || 15000); } From f45d85a181c478fe005f6e69fd0aa3a08687a3f3 Mon Sep 17 00:00:00 2001 From: johnathan White Date: Wed, 1 Sep 2021 09:31:15 -0400 Subject: [PATCH 3/3] more logging --- src/pages/exchange-crypto/exchange-crypto.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/exchange-crypto/exchange-crypto.ts b/src/pages/exchange-crypto/exchange-crypto.ts index 01d6efa754f..dd12584c4a6 100644 --- a/src/pages/exchange-crypto/exchange-crypto.ts +++ b/src/pages/exchange-crypto/exchange-crypto.ts @@ -182,12 +182,16 @@ export class ExchangeCryptoPage { this.getExchangesCurrencies(); this.onPauseSubscription = this.platform.pause.subscribe(() => { + this.logger.debug('Swap - onPauseSubscription called'); if (this.timeout) { + this.logger.debug('Swap - onPauseSubscription clearing timeout'); clearTimeout(this.timeout); } }); this.onResumeSubscription = this.platform.resume.subscribe(() => { + this.logger.debug('Swap - onResumeSubscription called'); if (this.exchangeToUse == '1inch' && !this.fromWalletAllowanceOk) { + this.logger.debug('Swap - onResumeSubscription checking Confirmation'); this.checkConfirmation(1000); } });