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:
parent
dad29d7611
commit
2b695af9f0
@ -163,20 +163,14 @@ export function JsonRpcContextProvider({ children }: { children: ReactNode | Rea
|
||||
};
|
||||
}
|
||||
|
||||
let result = "";
|
||||
|
||||
try {
|
||||
result = await client!.request({
|
||||
topic: session!.topic,
|
||||
chainId,
|
||||
request: {
|
||||
method: "eth_sendTransaction",
|
||||
params: [tx],
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
const result = await client!.request({
|
||||
topic: session!.topic,
|
||||
chainId,
|
||||
request: {
|
||||
method: "eth_sendTransaction",
|
||||
params: [tx],
|
||||
},
|
||||
});
|
||||
|
||||
// format displayed result
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user