fix: sets rpc result to null on rejection for EthereumProvider examples

This commit is contained in:
Ben Kremer 2022-03-10 12:16:05 +01:00
parent 929779f213
commit 512d9f1ccc
2 changed files with 2 additions and 0 deletions

View File

@ -218,6 +218,7 @@ export default function App() {
setRpcResult(result);
} catch (error) {
console.error("RPC request failed:", error);
setRpcResult(null);
} finally {
setIsRpcRequestPending(false);
}

View File

@ -227,6 +227,7 @@ export default function App() {
setRpcResult(result);
} catch (error) {
console.error("RPC request failed:", error);
setRpcResult(null);
} finally {
setIsRpcRequestPending(false);
}