taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit cc2ecf698d22071c4e98376b68554e6eed009e67
parent c8f01b1ee385083917c0337005c846ed1788a81f
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Thu,  6 Nov 2025 17:14:06 +0100

some more routing improvements

Diffstat:
Mpackages/taler-wallet-webextension/src/wallet/Application.tsx | 8+++++++-
Mpackages/taler-wallet-webextension/src/wallet/Contacts.tsx | 7++++++-
2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/packages/taler-wallet-webextension/src/wallet/Application.tsx b/packages/taler-wallet-webextension/src/wallet/Application.tsx @@ -164,7 +164,13 @@ export function Application(): VNode { goToTransaction={redirectToTxInfo} goToURL={redirectToURL} > - <ContactsPage tid={tid} /> + <ContactsPage + onMessageSent={() => { + return redirectTo(Pages.contacts({})); + } + } + tid={tid} + /> </WalletTemplate> )} /> diff --git a/packages/taler-wallet-webextension/src/wallet/Contacts.tsx b/packages/taler-wallet-webextension/src/wallet/Contacts.tsx @@ -49,12 +49,14 @@ interface Props { tid?: string; scope?: ScopeInfo; search?: boolean; + onMessageSent?: () => Promise<void>; } export function ContactsPage({ tid, scope, search: showSearch, + onMessageSent }: Props): VNode { const transactionId = tid as TransactionIdStr; //FIXME: validate const { i18n } = useTranslationContext(); @@ -120,10 +122,13 @@ export function ContactsPage({ if (!t.talerUri) { return; } - api.wallet.call(WalletApiOperation.SendTalerUriMailboxMessage, { + await api.wallet.call(WalletApiOperation.SendTalerUriMailboxMessage, { contact: c, talerUri: t.talerUri, }).then(); + if (onMessageSent) { + onMessageSent(); + } }; return ( <ContactsView