explicit error handling during sign request

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2025-11-29 13:11:08 +03:00
parent 8cad0db3b8
commit cad8fa9f8d
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
2 changed files with 16 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "ghost-wallet",
"version": "0.1.4",
"version": "0.1.5",
"description": "Browser extension to manage ghost blockchain light clients.",
"main": "dist/src/index.js",
"author": "Uncle f4ts0 <f4ts0@ghostchain.io>",

View File

@ -31,9 +31,22 @@ export const SignRequest = () => {
window.close()
return null
}
if (isLoading) {
return (
<Layout>
<h1 className="text-3xl font-bold mb-6 px-6">Loading Sign Request #{signRequestId}</h1>
</Layout>
)
}
const request = signRequests?.[signRequestId]
if (isLoading || !request) {
return null
if (error || !request) {
return (
<Layout>
<h1>Could not parse the sign request #{signRequestId}</h1>
<br />
Error: {error?.message}
</Layout>
)
}
return (