-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: fetchDepositsByParentTxHashFromEventLog #2175
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
parentChainId: number | ||
): Promise<ParentTransactionReceipt | undefined> { | ||
try { | ||
const parentProvider = getProviderForChainId(Number(parentChainId)) |
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.
parentChainId
should already be a number according to type on L28. If we expect to receive other type, we should update L28. Otherwise we can remove the casting here.
const parentToChildMessagesClassic = isClassic | ||
? await parentTxReceipt.getParentToChildMessagesClassic(childProvider) | ||
: ([] as ParentToChildMessageReaderClassic[]) | ||
|
||
const parentToChildMessages = isClassic | ||
? ([] as ParentToChildMessageReader[]) | ||
: await parentTxReceipt.getParentToChildMessages(childProvider) |
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.
We can run those 2 queries in parallel with Promise.all
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.
We can also add the third one below on L93
expect(result.tokenDepositRetryables).toEqual( | ||
expect.arrayContaining([ | ||
expect.objectContaining({ |
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.
you can call directly expect(result.tokenDepositRetryables).toEqual([{...}]
…ntTxHashFromEventLog
Currently this PR only supports post-nitro txs
it covers all Orbit chains' use case as they have never used classic
Closes FS-1088