taler-typescript-core

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

commit 8d5bb9d2a88bd9105e0d166d5cd4393b9ced7051
parent 4d23e6cff4f10dbf02f608532c40539af69bd129
Author: Sebastian <sebasjm@gmail.com>
Date:   Thu, 19 Jun 2025 14:48:51 -0300

fix #9620

Diffstat:
Mpackages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx | 22----------------------
Mpackages/merchant-backoffice-ui/src/paths/instance/token/index.tsx | 26--------------------------
2 files changed, 0 insertions(+), 48 deletions(-)

diff --git a/packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx @@ -32,7 +32,6 @@ import { undefinedIfEmpty } from "../../../utils/table.js"; interface Props { instanceId: string; hasToken: boolean | undefined; - onClearToken: (c: AccessToken | undefined) => void; onNewToken: (c: AccessToken | undefined, s: AccessToken) => void; onBack?: () => void; } @@ -42,7 +41,6 @@ export function DetailPage({ hasToken, onBack, onNewToken, - onClearToken, }: Props): VNode { type State = { old_token: string; new_token: string; repeat_token: string }; const [form, setValue] = useState<Partial<State>>({ @@ -121,26 +119,6 @@ export function DetailPage({ tooltip={i18n.str`Password currently in use`} inputType="password" /> - <p> - <i18n.Translate> - Clearing the password will mean public access to the - instance. - </i18n.Translate> - </p> - <div class="buttons is-right mt-5"> - <button - class="button" - onClick={() => { - if (hasToken) { - onClearToken(form.old_token ? createRFC8959AccessTokenPlain(form.old_token) : undefined); - } else { - onClearToken(undefined); - } - }} - > - <i18n.Translate>Clear password</i18n.Translate> - </button> - </div> </Fragment> )} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx @@ -97,32 +97,6 @@ function CommonToken( onBack={onCancel} instanceId={result.body.name} hasToken={hasToken} - onClearToken={async (currentToken): Promise<void> => { - try { - const resp = await updateCurrentInstanceAuthentication( - currentToken, - { - method: MerchantAuthMethod.EXTERNAL, - }, - ); - if (resp.type === "ok") { - onChange(); - } else { - return setNotif({ - message: i18n.str`Failed to clear password`, - type: "ERROR", - description: resp.detail?.hint, - }); - } - } catch (error) { - return setNotif({ - message: i18n.str`Failed to clear password`, - type: "ERROR", - description: - error instanceof Error ? error.message : String(error), - }); - } - }} onNewToken={async (currentToken, newToken): Promise<void> => { try { {