use redirect instead of openFromPopup on qr detection
This commit is contained in:
parent
5fb13fae24
commit
bc4964d4ff
@ -59,7 +59,10 @@ function replaceAll(
|
|||||||
): string {
|
): string {
|
||||||
let result = pattern;
|
let result = pattern;
|
||||||
for (const v in vars) {
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,11 @@
|
|||||||
* @author sebasjm
|
* @author sebasjm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { TalerUri, TranslatedString } from "@gnu-taler/taler-util";
|
import {
|
||||||
|
TalerUri,
|
||||||
|
TranslatedString,
|
||||||
|
stringifyTalerUri,
|
||||||
|
} from "@gnu-taler/taler-util";
|
||||||
import {
|
import {
|
||||||
TranslationProvider,
|
TranslationProvider,
|
||||||
useTranslationContext,
|
useTranslationContext,
|
||||||
@ -103,7 +107,11 @@ export function Application(): VNode {
|
|||||||
<WalletTemplate goToTransaction={redirectToTxInfo}>
|
<WalletTemplate goToTransaction={redirectToTxInfo}>
|
||||||
<QrReaderPage
|
<QrReaderPage
|
||||||
onDetected={(talerActionUrl: TalerUri) => {
|
onDetected={(talerActionUrl: TalerUri) => {
|
||||||
platform.openWalletURIFromPopup(talerActionUrl);
|
redirectTo(
|
||||||
|
Pages.defaultCta({
|
||||||
|
uri: stringifyTalerUri(talerActionUrl),
|
||||||
|
}),
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</WalletTemplate>
|
</WalletTemplate>
|
||||||
|
Loading…
Reference in New Issue
Block a user