Gas estimation#1726
Open
Mi-Lan wants to merge 18 commits into
Open
Conversation
✅ Deploy Preview for swapr ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
berteotti
reviewed
Mar 2, 2023
berteotti
left a comment
Collaborator
There was a problem hiding this comment.
Left some comments. Code looks good just needs a few improvements.
Comment on lines
+230
to
238
| let transactionRequest: any | ||
| try { | ||
| transactionRequest = await call.transactionParameters | ||
| } catch (e) { | ||
| console.log('Failed to get transaction parameters', e) | ||
| } | ||
|
|
||
| // Ignore gas estimation if the request has gasLimit property | ||
| if (transactionRequest.gasLimit) { |
Collaborator
There was a problem hiding this comment.
If transactionRequest is undefined it could break when checking transactionRequest.gasLimit. Also I don't think we want to console.log the error, use .error in this case.
Collaborator
Author
There was a problem hiding this comment.
Yeah this part I noticed during testing that it wasn't handling the error so I put this in place. It didn't throw it for me.
Collaborator
|
Tested and looks ok to me 👍 |
fb69230 to
0c5053c
Compare
ff47650 to
b3b3815
Compare
91e4f23 to
af06da1
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked to this sdk pr
SwaprHQ/swapr-sdk#276
To test:
Some notes from my research: