commit adf75c2ecf81effa1257f528fb90f72129f1181d
parent df47d099d8cf774c5df61c19b6a1921745b1312e
Author: Sebastian <sebasjm@gmail.com>
Date: Tue, 8 Apr 2025 19:25:46 -0300
wip #9715: kyc spa should send json
Diffstat:
2 files changed, 1 insertion(+), 16 deletions(-)
diff --git a/packages/kyc-ui/src/pages/FillForm.tsx b/packages/kyc-ui/src/pages/FillForm.tsx
@@ -35,7 +35,6 @@ import {
useTranslationContext,
} from "@gnu-taler/web-util/browser";
import { Fragment, VNode, h } from "preact";
-import { useNotifierContext } from "../context/notifier.js";
import { usePreferences } from "../context/preferences.js";
import { useUiFormsContext } from "../context/ui-forms.js";
import { preloadedForms } from "../forms/index.js";
@@ -104,20 +103,7 @@ export function FillForm({
? undefined
: withErrorHandler(
async () => {
- // const data = new FormData()
- // data.set("header", JSON.stringify(information.header))
- // data.set("payload", JSON.stringify(information.payload))
- const data = new URLSearchParams();
- Object.entries(validatedForm as Record<string, unknown>).forEach(
- ([key, value]) => {
- if (key === "money") {
- data.set(key, Amounts.stringify(value as AmountJson));
- } else {
- data.set(key, String(value));
- }
- },
- );
- return lib.exchange.uploadKycForm(reqId, data);
+ return lib.exchange.uploadKycForm(reqId, validatedForm);
},
(res) => {
onComplete();
diff --git a/packages/kyc-ui/src/pages/TriggerForms.tsx b/packages/kyc-ui/src/pages/TriggerForms.tsx
@@ -38,7 +38,6 @@ export function TriggerForms({ formId }: Props): VNode {
const { i18n } = useTranslationContext();
const [notification, withErrorHandler, notify] =
useLocalNotificationHandler();
- const { config, lib } = useExchangeApiContext();
const pf = preloadedForms(i18n, {});