From 0eca96e9b94172ec16cf0ea53bd8b88b558573f9 Mon Sep 17 00:00:00 2001 From: mkue Date: Fri, 22 Dec 2023 09:58:59 +0700 Subject: [PATCH] bugfix(functions): fix typing issue --- .../PostfinancePaymentsFileImporter.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/src/storage/postfinance-payments-files/PostfinancePaymentsFileImporter.ts b/functions/src/storage/postfinance-payments-files/PostfinancePaymentsFileImporter.ts index f2395bf46..976964089 100644 --- a/functions/src/storage/postfinance-payments-files/PostfinancePaymentsFileImporter.ts +++ b/functions/src/storage/postfinance-payments-files/PostfinancePaymentsFileImporter.ts @@ -10,6 +10,7 @@ import { ContributionSourceKey, StatusKey, } from '../../../../shared/src/types/contribution'; +import { Currency } from '../../../../shared/src/types/currency'; import { USER_FIRESTORE_PATH, User } from '../../../../shared/src/types/user'; // TODO: write tests @@ -40,7 +41,7 @@ export class PostfinancePaymentsFileImporter { for (let node of nodes) { const contribution: BankWireContribution = { reference_id: parseFloat(select('string(//ns:Refs/ns:AcctSvcrRef)', node) as string), - currency: (select('string(//ns:Amt/@Ccy)', node) as string).toUpperCase(), + currency: (select('string(//ns:Amt/@Ccy)', node) as string).toUpperCase() as Currency, amount: parseFloat(select('string(//ns:Amt)', node) as string), amount_chf: parseFloat(select('string(//ns:Amt)', node) as string), fees_chf: 0,