From 0b1dc23cc660e0031bcf42bfbaf507e7354ef83f Mon Sep 17 00:00:00 2001 From: user Date: Fri, 14 Mar 2025 00:37:26 +0300 Subject: [PATCH] free upload support --- src/pages/root/steps/presubmit-step/index.tsx | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/pages/root/steps/presubmit-step/index.tsx b/src/pages/root/steps/presubmit-step/index.tsx index 3c43b0b..b6bba80 100644 --- a/src/pages/root/steps/presubmit-step/index.tsx +++ b/src/pages/root/steps/presubmit-step/index.tsx @@ -99,21 +99,22 @@ export const PresubmitStep = ({ prevStep }: PresubmitStepProps) => { }); if (createContentResponse.data) { - const transactionResponse = await tonConnectUI.sendTransaction({ - validUntil: Math.floor(Date.now() / 1000) + 120, - messages: [ - { - amount: createContentResponse.data.amount, - address: createContentResponse.data.address, - payload: createContentResponse.data.payload, - }, - ], - }); - - if (transactionResponse.boc) { - WebApp.close(); - } else { - console.error("Transaction failed:", transactionResponse); + if (createContentResponse.data.address != null) { + const transactionResponse = await tonConnectUI.sendTransaction({ + validUntil: Math.floor(Date.now() / 1000) + 120, + messages: [ + { + amount: createContentResponse.data.amount, + address: createContentResponse.data.address, + payload: createContentResponse.data.payload, + }, + ], + }); + if (transactionResponse.boc) { + WebApp.close(); + } else { + console.error("Transaction failed:", transactionResponse); + } } }