fix: allows rejected eth_sendTransaction call to bubble to handler

Fixes: https://github.com/WalletConnect/walletconnect-monorepo/issues/854

There was a superfluous try/catch here which caused the rejection to be
logged and then continue instead of throwing and allowing the
JsonRpcHandler wrapper to handle the promise rejection.
This commit is contained in:
Ben Kremer 2022-03-14 11:11:16 +01:00
parent dad29d7611
commit 2b695af9f0

View File

@ -163,10 +163,7 @@ export function JsonRpcContextProvider({ children }: { children: ReactNode | Rea
};
}
let result = "";
try {
result = await client!.request({
const result = await client!.request({
topic: session!.topic,
chainId,
request: {
@ -174,9 +171,6 @@ export function JsonRpcContextProvider({ children }: { children: ReactNode | Rea
params: [tx],
},
});
} catch (error) {
console.error(error);
}
// format displayed result
return {