From b0c87fbf3de984e53d9daf7733b8c5f8455dae2c Mon Sep 17 00:00:00 2001 From: "web@ppanel" Date: Sun, 15 Dec 2024 23:22:25 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(payment):=20Config=20and=20t?= =?UTF-8?q?ypes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/admin/app/dashboard/payment/alipayf2f.tsx | 12 ++++-------- apps/admin/app/dashboard/payment/epay.tsx | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/apps/admin/app/dashboard/payment/alipayf2f.tsx b/apps/admin/app/dashboard/payment/alipayf2f.tsx index 26a07d8..d57faa2 100644 --- a/apps/admin/app/dashboard/payment/alipayf2f.tsx +++ b/apps/admin/app/dashboard/payment/alipayf2f.tsx @@ -207,10 +207,8 @@ export default function AlipayF2F() { defaultValue={data?.config.private_key} onBlur={(e) => { updateConfig('config', { - config: { - ...data?.config, - private_key: e.target.value, - }, + ...data?.config, + private_key: e.target.value, }); }} /> @@ -227,10 +225,8 @@ export default function AlipayF2F() { value={data?.config.public_key} onBlur={(e) => { updateConfig('config', { - config: { - ...data?.config, - public_key: e.target.value, - }, + ...data?.config, + public_key: e.target.value, }); }} /> diff --git a/apps/admin/app/dashboard/payment/epay.tsx b/apps/admin/app/dashboard/payment/epay.tsx index 85baa42..2dd98c1 100644 --- a/apps/admin/app/dashboard/payment/epay.tsx +++ b/apps/admin/app/dashboard/payment/epay.tsx @@ -36,7 +36,7 @@ export default function Epay() { await updateEpayPaymentConfig({ ...data, [key]: value, - } as API.PaymentConfig); + } as API.UpdateEpayRequest); toast.success(t('saveSuccess')); refetch(); } catch (error) {