diff --git a/src/App.tsx b/src/App.tsx index de83cfe..c77b81b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1381,6 +1381,7 @@ function App() { const registerName = async () => { try { if (!userInfo?.address) throw new Error("Your address was not found"); + if(!registerNameValue) throw new Error('Enter a name') const fee = await getFee("REGISTER_NAME"); await show({ message: "Would you like to register this name?", diff --git a/src/background.ts b/src/background.ts index 8cc4665..6666453 100644 --- a/src/background.ts +++ b/src/background.ts @@ -2006,7 +2006,7 @@ export async function registerName({ name }) { const res = await processTransactionVersion2(signedBytes); if (!res?.signature) - throw new Error("Transaction was not able to be processed"); + throw new Error(res?.message || "Transaction was not able to be processed"); return res; } export async function makeAdmin({ groupId, qortalAddress }) { diff --git a/src/components/Apps/useQortalMessageListener.tsx b/src/components/Apps/useQortalMessageListener.tsx index 68c7fa1..8b48642 100644 --- a/src/components/Apps/useQortalMessageListener.tsx +++ b/src/components/Apps/useQortalMessageListener.tsx @@ -499,7 +499,10 @@ isDOMContentLoaded: false if (response.error) { eventPort.postMessage({ result: null, - error: response, + error: { + error: response.error, + message: typeof response?.error === 'string' ? response.error : 'An error has occurred' + }, }); } else { eventPort.postMessage({