From 15cd8169f8d5c61da4b9ab2a648de0c043e12ef4 Mon Sep 17 00:00:00 2001 From: Manank Patni Date: Fri, 22 Sep 2023 16:57:58 +0530 Subject: [PATCH] Add error message for dao creation (#671) Signed-off-by: Manank Patni --- src/modules/lite/creator/index.tsx | 5 +++-- src/services/contracts/baseDAO/hooks/useOriginate.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/lite/creator/index.tsx b/src/modules/lite/creator/index.tsx index 5622affa..86cb7509 100644 --- a/src/modules/lite/creator/index.tsx +++ b/src/modules/lite/creator/index.tsx @@ -421,7 +421,7 @@ export const CommunityCreator: React.FC = () => { } const resp = await saveLiteCommunity(signature, publicKey, payloadBytes) - + const response = await resp.json() if (resp.ok) { openNotification({ message: "Community created!", @@ -431,13 +431,14 @@ export const CommunityCreator: React.FC = () => { navigate.push("/explorer") } else { openNotification({ - message: "Community could not be created!", + message: response.message, autoHideDuration: 3000, variant: "error" }) return } } catch (error) { + console.log("error: ", error) openNotification({ message: "Community could not be created!", autoHideDuration: 3000, diff --git a/src/services/contracts/baseDAO/hooks/useOriginate.ts b/src/services/contracts/baseDAO/hooks/useOriginate.ts index c39d21dc..9d44a261 100644 --- a/src/services/contracts/baseDAO/hooks/useOriginate.ts +++ b/src/services/contracts/baseDAO/hooks/useOriginate.ts @@ -248,7 +248,7 @@ export const useOriginate = (template: DAOTemplate) => { description: params.orgSettings.description, linkToTerms: contract.address, picUri: "", - members: [], + members: [account], polls: [], tokenAddress: params.orgSettings.governanceToken.address, tokenType: "FA2",