-
Notifications
You must be signed in to change notification settings - Fork 34
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
Leverage wormscan client on sourcetx middleware #214
Conversation
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.
Added some comments, PTAL
await sleep((attempt + 1) * 200); // linear wait | ||
} | ||
} while (++attempt < retries && !txHash); | ||
let txHash = response.data?.txHash || ""; |
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.
May be we can throw an error if we don't find txHash
on the response data object and remove empty string as fallback.
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.
Maybe we should put a comment somewhere (or ideally on documentation if we had any), but...
It's a design decision not to throw an error. This is becase you wan't to leave this decision to the user of relayer-engine. The source tx hash is strictly necessary for processing some VAAs, but not for others, so it's up to the user to decide.
At some point we thought that maybe we can make this a configuration of the middleware but never got to implement it... for the time been I'd leave it as is
Appreciate that you went the extra mile and implemented this 🖤 |
90a89f1
to
5a44a0f
Compare
5a44a0f
to
baa27b3
Compare
No description provided.