Skip to content
Discussion options

You must be logged in to vote

Most methods (especially in the provider, where things are already wildly async) take in either a Promise<string> | string. By passing it through Promise.resolve, the logic is greatly simplified. This may be changing in v6, still contemplating about it, since await is now fairly widespread. :)

But for example, in your above example for the second case, hexlify(signedTransaction) would result in an error if a Promise<string> was passed in for signedTransaction.

Make sense?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JackieKu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants