-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(bridge-ui-v2): fixing getFilterLogs errors (#15468)
- Loading branch information
1 parent
552e983
commit ea2d929
Showing
9 changed files
with
76 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/bridge-ui-v2/src/libs/util/fetchTransactionReceipt.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import type { Hash } from 'viem'; | ||
|
||
import { chains } from '$libs/chain'; | ||
|
||
export async function fetchTransactionReceipt(transactionHash: Hash, chainId: number) { | ||
try { | ||
const nodeUrl = chains.find((c) => c.id === chainId)?.rpcUrls?.public?.http[0]; | ||
if (!nodeUrl) { | ||
throw new Error('Node URL not found'); | ||
} | ||
|
||
const response = await fetch(nodeUrl, { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
body: JSON.stringify({ | ||
jsonrpc: '2.0', | ||
method: 'eth_getTransactionReceipt', | ||
params: [transactionHash], | ||
id: 1, | ||
}), | ||
}); | ||
|
||
const data = await response.json(); | ||
return data.result; | ||
} catch (error) { | ||
console.error('Error fetching transaction receipt:', error); | ||
throw error; | ||
} | ||
} |
ea2d929
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
bridge-ui-v2-internal – ./packages/bridge-ui-v2
bridge-ui-v2-internal.vercel.app
bridge-ui-v2-internal-taikoxyz.vercel.app
bridge-ui-v2-internal-git-alpha-6-taikoxyz.vercel.app
ea2d929
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
bridge-ui-v2-a6 – ./packages/bridge-ui-v2
bridge-ui-v2-a6.vercel.app
bridge-ui-v2-a6-git-alpha-6-taikoxyz.vercel.app
bridge-ui-v2-a6-taikoxyz.vercel.app
bridge.katla.taiko.xyz