finished apps feature for mobile

This commit is contained in:
2024-10-21 11:40:45 +03:00
parent 44c6b5ad32
commit 6b3a1f51ba
23 changed files with 762 additions and 365 deletions

View File

@@ -319,7 +319,6 @@ export const decodeBase64ForUIChatMessages = (messages)=> {
if (decryptedKey) {
// Decrypt the data using the symmetric key.
const decryptedData = nacl.secretbox.open(encryptedData, nonce, decryptedKey)
console.log('decryptedData', decryptedData)
// If decryption was successful, decryptedData will not be null.
if (decryptedData) {
return decryptedData

View File

@@ -61,25 +61,7 @@ export const publishData = async ({
tag5,
feeAmount
}: any) => {
console.log({
registeredName,
file,
service,
identifier,
uploadType,
isBase64,
filename,
withFee,
title,
description,
category,
tag1,
tag2,
tag3,
tag4,
tag5,
feeAmount
})
const validateName = async (receiverName: string) => {
return await reusableGet(`/names/${receiverName}`)
}
@@ -171,7 +153,6 @@ export const publishData = async ({
fee = feeAmount
} else if (withFee) {
const res = await getArbitraryFee()
console.log('res', res)
if (res.fee) {
fee = res.fee
} else {
@@ -180,7 +161,6 @@ export const publishData = async ({
}
let transactionBytes = await uploadData(registeredName, file, fee)
console.log('transactionBytes', transactionBytes)
if (!transactionBytes || transactionBytes.error) {
throw new Error(transactionBytes?.message || 'Error when uploading')
} else if (transactionBytes.includes('Error 500 Internal Server Error')) {
@@ -201,7 +181,6 @@ export const publishData = async ({
}
const uploadData = async (registeredName: string, file:any, fee: number) => {
console.log('uploadData', registeredName, file, fee)
let postBody = ''
let urlSuffix = ''
@@ -230,7 +209,6 @@ export const publishData = async ({
}
let uploadDataUrl = `/arbitrary/${service}/${registeredName}${urlSuffix}`
console.log('uploadDataUrl', uploadDataUrl)
if (identifier?.trim().length > 0) {
uploadDataUrl = `/arbitrary/${service}/${registeredName}/${identifier}${urlSuffix}`
}
@@ -273,7 +251,6 @@ export const publishData = async ({
if (tag5 != null && tag5 != 'undefined') {
uploadDataUrl = uploadDataUrl + '&tags=' + encodeURIComponent(tag5)
}
console.log('uploadDataUrl2', uploadDataUrl)
return await reusablePost(uploadDataUrl, postBody)
@@ -282,7 +259,6 @@ export const publishData = async ({
try {
return await validate()
} catch (error: any) {
console.log('error2', error)
throw new Error(error?.message)
}
}