fix: sets rpc result to null on rejection for EthereumProvider examples
This commit is contained in:
parent
929779f213
commit
512d9f1ccc
@ -218,6 +218,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(null);
|
||||||
} finally {
|
} finally {
|
||||||
setIsRpcRequestPending(false);
|
setIsRpcRequestPending(false);
|
||||||
}
|
}
|
||||||
|
@ -227,6 +227,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(null);
|
||||||
} finally {
|
} finally {
|
||||||
setIsRpcRequestPending(false);
|
setIsRpcRequestPending(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user