Skip to content

Commit 825bc04

Browse files
authored
Merge pull request #86 from ChainSafe/irubido/localhotEnvDefault
error handle fix web-wallet, default snap localhost
2 parents 6c24730 + 6298e98 commit 825bc04

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/web-wallet/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SNAP_ORIGIN=""
1+
SNAP_ORIGIN="local:http://localhost:8080"

packages/web-wallet/src/hooks/snaps/useRequest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const useRequest = () => {
2020
* @param params.params - The method params.
2121
* @returns The result of the request.
2222
*/
23+
2324
const request: Request = async ({ method, params }) => {
2425
try {
2526
const data =
@@ -32,7 +33,7 @@ export const useRequest = () => {
3233
} catch (requestError) {
3334
setError(requestError as Error);
3435

35-
return null;
36+
throw requestError;
3637
}
3738
};
3839

0 commit comments

Comments
 (0)