use redirect instead of openFromPopup on qr detection

This commit is contained in:
Sebastian 2023-05-22 14:36:59 -03:00
parent 5fb13fae24
commit bc4964d4ff
No known key found for this signature in database
GPG Key ID: 173909D1A5F66069
2 changed files with 14 additions and 3 deletions

View File

@ -59,7 +59,10 @@ function replaceAll(
): string {
let result = pattern;
for (const v in vars) {
result = result.replace(vars[v], !values[v] ? "" : values[v]);
result = result.replace(
vars[v],
!values[v] ? "" : encodeURIComponent(values[v]),
);
}
return result;
}

View File

@ -20,7 +20,11 @@
* @author sebasjm
*/
import { TalerUri, TranslatedString } from "@gnu-taler/taler-util";
import {
TalerUri,
TranslatedString,
stringifyTalerUri,
} from "@gnu-taler/taler-util";
import {
TranslationProvider,
useTranslationContext,
@ -103,7 +107,11 @@ export function Application(): VNode {
<WalletTemplate goToTransaction={redirectToTxInfo}>
<QrReaderPage
onDetected={(talerActionUrl: TalerUri) => {
platform.openWalletURIFromPopup(talerActionUrl);
redirectTo(
Pages.defaultCta({
uri: stringifyTalerUri(talerActionUrl),
}),
);
}}
/>
</WalletTemplate>