fix(v2-cosmos-provider): set RPC result on caught error
This commit is contained in:
parent
2e0ead7011
commit
44b2cac9f3
@ -22,9 +22,9 @@ import {
|
|||||||
import { useWalletConnectClient } from "./contexts/ClientContext";
|
import { useWalletConnectClient } from "./contexts/ClientContext";
|
||||||
|
|
||||||
interface IFormattedRpcResponse {
|
interface IFormattedRpcResponse {
|
||||||
method: string;
|
method?: string;
|
||||||
address: string;
|
address?: string;
|
||||||
valid: boolean;
|
valid?: boolean;
|
||||||
result: string;
|
result: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,6 +179,7 @@ export default function App() {
|
|||||||
setRpcResult(result);
|
setRpcResult(result);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("RPC request failed:", error);
|
console.error("RPC request failed:", error);
|
||||||
|
setRpcResult({ result: error as string });
|
||||||
} finally {
|
} finally {
|
||||||
setIsRpcRequestPending(false);
|
setIsRpcRequestPending(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user