commit d369ae0d842ca2ff8e02ef7935501d80696b3833
parent a235ca87b23c5d4672673893ab7c384b2db8e5d2
Author: Sebastian <sebasjm@gmail.com>
Date: Wed, 9 Apr 2025 12:03:33 -0300
fix #9715
Diffstat:
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/packages/kyc-ui/src/pages/FillForm.tsx b/packages/kyc-ui/src/pages/FillForm.tsx
@@ -38,6 +38,7 @@ import { Fragment, VNode, h } from "preact";
import { usePreferences } from "../context/preferences.js";
import { useUiFormsContext } from "../context/ui-forms.js";
import { preloadedForms } from "../forms/index.js";
+import { TalerFormAttributes } from "@gnu-taler/taler-util";
const TALER_SCREEN_ID = 103;
@@ -49,6 +50,8 @@ type Props = {
};
type FormType = {
+ form_id: string;
+ [TalerFormAttributes.FORM_ID]: string;
// state: TalerExchangeApi.AmlState;
};
@@ -103,6 +106,8 @@ export function FillForm({
? undefined
: withErrorHandler(
async () => {
+ validatedForm.form_id = formId
+ validatedForm[TalerFormAttributes.FORM_ID] = formId
return lib.exchange.uploadKycForm(reqId, validatedForm);
},
(res) => {
diff --git a/packages/taler-util/src/http-client/exchange.ts b/packages/taler-util/src/http-client/exchange.ts
@@ -48,6 +48,7 @@ import {
AmlDecisionRequest,
BatchWithdrawResponse,
ExchangeBatchWithdrawRequest,
+ ExchangeKycUploadFormRequest,
ExchangeVersionResponse,
KycRequirementInformationId,
WalletKycRequest,
@@ -740,7 +741,7 @@ export class TalerExchangeHttpClient {
* https://docs.taler.net/core/api-exchange.html#post--kyc-upload-$ID
*
*/
- async uploadKycForm(requirement: KycRequirementInformationId, body: object) {
+ async uploadKycForm(requirement: KycRequirementInformationId, body: ExchangeKycUploadFormRequest) {
const url = new URL(`kyc-upload/${requirement}`, this.baseUrl);
const resp = await this.httpLib.fetch(url.href, {
diff --git a/packages/taler-util/src/types-taler-exchange.ts b/packages/taler-util/src/types-taler-exchange.ts
@@ -1839,6 +1839,12 @@ export interface KycRequirementInformation {
id?: KycRequirementInformationId;
}
+export interface ExchangeKycUploadFormRequest {
+ // Which form is being submitted. Further details depend on the form.
+ // @since protocol v26.
+ form_id: string;
+}
+
// Since **vATTEST**.
export interface KycCheckPublicInformation {
// English description of the check.