explicit error handling during sign request
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
8cad0db3b8
commit
cad8fa9f8d
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ghost-wallet",
|
"name": "ghost-wallet",
|
||||||
"version": "0.1.4",
|
"version": "0.1.5",
|
||||||
"description": "Browser extension to manage ghost blockchain light clients.",
|
"description": "Browser extension to manage ghost blockchain light clients.",
|
||||||
"main": "dist/src/index.js",
|
"main": "dist/src/index.js",
|
||||||
"author": "Uncle f4ts0 <f4ts0@ghostchain.io>",
|
"author": "Uncle f4ts0 <f4ts0@ghostchain.io>",
|
||||||
|
|||||||
@ -31,9 +31,22 @@ export const SignRequest = () => {
|
|||||||
window.close()
|
window.close()
|
||||||
return null
|
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]
|
const request = signRequests?.[signRequestId]
|
||||||
if (isLoading || !request) {
|
if (error || !request) {
|
||||||
return null
|
return (
|
||||||
|
<Layout>
|
||||||
|
<h1>Could not parse the sign request #{signRequestId}</h1>
|
||||||
|
<br />
|
||||||
|
Error: {error?.message}
|
||||||
|
</Layout>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user