From bcb106c19924c5b4c4f4031f004034e9479f89be Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 27 May 2021 01:05:04 +0300 Subject: [PATCH] fix: don't break iteraction urls with a custom prefix --- src/app/pages/account-share/account-share.page.ts | 2 +- src/app/pages/transaction-signed/transaction-signed.page.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/pages/account-share/account-share.page.ts b/src/app/pages/account-share/account-share.page.ts index ba962a35..e4bc0891 100644 --- a/src/app/pages/account-share/account-share.page.ts +++ b/src/app/pages/account-share/account-share.page.ts @@ -15,7 +15,7 @@ export class AccountSharePage { constructor(private readonly navigationService: NavigationService) { this.interactionUrl = this.navigationService.getState().interactionUrl - this.splits = this.interactionUrl.substr('airgap-wallet://?d='.length).split(',') + this.splits = this.interactionUrl.replace(/^airgap-wallet:\/\/\?d=/, '').split(',') } public done(): void { diff --git a/src/app/pages/transaction-signed/transaction-signed.page.ts b/src/app/pages/transaction-signed/transaction-signed.page.ts index a281155b..f44599a1 100644 --- a/src/app/pages/transaction-signed/transaction-signed.page.ts +++ b/src/app/pages/transaction-signed/transaction-signed.page.ts @@ -33,7 +33,7 @@ export class TransactionSignedPage { constructor(public navigationService: NavigationService, private readonly translateService: TranslateService) { this.interactionUrl = this.navigationService.getState().interactionUrl - this.splits = this.interactionUrl.substr('airgap-wallet://?d='.length).split(',') + this.splits = this.interactionUrl.replace(/^airgap-wallet:\/\/\?d=/, '').split(',') this.wallets = this.navigationService.getState().wallets this.signedTxs = this.navigationService.getState().signedTxs this.translationKey = this.navigationService.getState().translationKey