From 6fb03b81d8023c33edaab11fe598ad0241d45e65 Mon Sep 17 00:00:00 2001 From: Manank Patni Date: Sun, 1 Oct 2023 04:30:42 +0530 Subject: [PATCH] Change file upload limit to 5KB Signed-off-by: Manank Patni --- src/modules/lite/creator/components/UploadAvatar.tsx | 4 ++-- src/services/bakingBad/delegations/index.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/lite/creator/components/UploadAvatar.tsx b/src/modules/lite/creator/components/UploadAvatar.tsx index 977aa464..f6bba449 100644 --- a/src/modules/lite/creator/components/UploadAvatar.tsx +++ b/src/modules/lite/creator/components/UploadAvatar.tsx @@ -42,7 +42,7 @@ export const UploadAvatar: React.FC = ({ setFieldValue, values, disabled }) return ( - Avatar + Avatar - 5Kb Max @@ -66,7 +66,7 @@ export const UploadAvatar: React.FC = ({ setFieldValue, values, disabled }) setAvatarPreview(fileReader.result) } } - if (e.target && e.target.files && e.target.files?.length > 0) { + if (e.target && e.target.files && e.target.files?.length > 0 && e.target.files[0].size < 5000) { fileReader.readAsDataURL(e.target.files[0]) } }} diff --git a/src/services/bakingBad/delegations/index.ts b/src/services/bakingBad/delegations/index.ts index 1cde4dd7..2bc8e4d5 100644 --- a/src/services/bakingBad/delegations/index.ts +++ b/src/services/bakingBad/delegations/index.ts @@ -22,7 +22,6 @@ export const getLatestDelegation = async (daoAddress: string, network: Network) export const getTokenDelegation = async (tokenAddress: string, account: string, network: Network) => { const url = `https://api.${networkNameMap[network]}.tzkt.io/v1/contracts/${tokenAddress}/bigmaps/delegates/keys?key.eq=${account}&active=true` - console.log("urlssdasd: ", url) const response = await fetch(url) if (!response.ok) {