taler-typescript-core

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

commit f215407d7e7febc2968fd04ba963d466407ebffa
parent 3a84bdbfa0957620be6721546dd6cdd902ceaa5b
Author: Sebastian <sebasjm@gmail.com>
Date:   Thu,  1 May 2025 13:28:25 -0300

missing instance name

Diffstat:
Mpackages/merchant-backoffice-ui/src/paths/admin/create/index.tsx | 17++++++++++-------
Mpackages/merchant-backoffice-ui/src/paths/instance/token/index.tsx | 4++--
2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/packages/merchant-backoffice-ui/src/paths/admin/create/index.tsx b/packages/merchant-backoffice-ui/src/paths/admin/create/index.tsx @@ -59,16 +59,19 @@ export default function Create({ onBack, onConfirm, forceId }: Props): VNode { } if (d.auth.token) { //if auth has been updated, request a new access token - const result = await lib.instance.createAuthTokenFromToken(d.auth.token, { - scope: "write", - duration: { - d_us: "forever", + const result = await lib.instance.createAuthTokenFromToken( + d.auth.token, + { + scope: "write", + duration: { + d_us: "forever", + }, + refreshable: true, }, - refreshable: true, - }); + ); if (result.type === "ok") { const { token } = result.body; - logIn(token); + logIn(state.instance, token); } } onConfirm(); diff --git a/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx @@ -39,7 +39,7 @@ interface Props { export default function Token({ onChange, onCancel }: Props): VNode { const { i18n } = useTranslationContext(); - const { logIn, lib } = useSessionContext(); + const { state, logIn, lib } = useSessionContext(); const [notif, setNotif] = useState<Notification | undefined>(undefined); const result = useInstanceDetails(); @@ -122,7 +122,7 @@ export default function Token({ onChange, onCancel }: Props): VNode { refreshable: true, }); if (resp.type === "ok") { - logIn(resp.body.token); + logIn(state.instance, resp.body.token); return onChange(); } else { return setNotif({