From c9a678368333b81190bce403c064d2acf777c34b Mon Sep 17 00:00:00 2001 From: Nicola Benaglia Date: Sat, 24 May 2025 14:16:31 +0200 Subject: [PATCH] Fix conflicts --- src/encryption/encryption.ts | 3 --- src/qdn/publish/publish.ts | 16 ++++++---------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/encryption/encryption.ts b/src/encryption/encryption.ts index 09af412..cf96e89 100644 --- a/src/encryption/encryption.ts +++ b/src/encryption/encryption.ts @@ -294,9 +294,6 @@ export const publishOnQDN = async ({ }) => { if (data && service) { const registeredName = name || (await getNameInfo()); -}) => { - if (data && service) { - const registeredName = await getNameInfo(); if (!registeredName) throw new Error( i18n.t('core:message.generic.name_publish', { diff --git a/src/qdn/publish/publish.ts b/src/qdn/publish/publish.ts index b105a1a..43ca630 100644 --- a/src/qdn/publish/publish.ts +++ b/src/qdn/publish/publish.ts @@ -83,29 +83,25 @@ async function getKeyPair() { } export const publishData = async ({ + category, data, + description, feeAmount, filename, identifier, isBase64, registeredName, - file, service, - identifier, - uploadType, - withFee, - title, - description, - category, tag1, tag2, tag3, tag4, tag5, + title, + uploadType, + withFee, }: any) => { console.log('data', data); - feeAmount, -}: any) => { const validateName = async (receiverName: string) => { return await reusableGet(`/names/${receiverName}`); }; @@ -232,7 +228,7 @@ export const publishData = async ({ let transactionBytes = await uploadData(registeredName, data, fee); console.log('transactionBytes length', transactionBytes?.length); - + if (!transactionBytes || transactionBytes.error) { throw new Error(transactionBytes?.message || 'Error when uploading'); } else if (transactionBytes.includes('Error 500 Internal Server Error')) {