-
Notifications
You must be signed in to change notification settings - Fork 19
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
[ENG-3471] feat: use estimated fees for stx transactions #720
[ENG-3471] feat: use estimated fees for stx transactions #720
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.
Good job 👍 left a small ask below :)
@@ -55,11 +55,7 @@ function TransactionRequest() { | |||
tokenTransferPayload.amount, | |||
tokenTransferPayload.memo!, |
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.
Let's also add a check for the tokenTransferPayload.memo
here to make the code safer?
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.
good call. it should be an optional arg in the core function
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.
but I don't want to refactor the core function to make it optional, because then I should also reorder the args to have memo?: string come after the required params.
maybe a compromise here is to apply the default earlier like tokenTransferPayload.memo ?? ''
Test with build here: https://github.com/secretkeylabs/xverse-web-extension/actions/runs/7445216412 |
🔘 PR Type
📜 Background
https://linear.app/xverseapp/issue/ENG-3458
depends on secretkeylabs/xverse-core#323 and
secretkeylabs/xverse-core#335
🔄 Changes
Impact:
🖼 Screenshot / 📹 Video
send stx (estimates are returning high fees. screenshot shows capped at threshold: 1STX):
![image](https://private-user-images.githubusercontent.com/6109710/294143960-0cab4d67-02ad-42c8-83a2-08b5b1889bb2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM0MzA1NTAsIm5iZiI6MTcyMzQzMDI1MCwicGF0aCI6Ii82MTA5NzEwLzI5ND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aWduYXR1cmU9ZTdmNWZlNGNmYzM2MTY0ZGYzMDE3MDQ1YTI4NThlZDYxOTY4ZDJmYmI1ODI0MzJlODIxNWUyOTJhM2ViYjhmYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.Z929uKE1muXHXYKM0Y5vRZU62pUr7yshaNfOQ1vDyKY)
send ft:
![image](https://private-user-images.githubusercontent.com/6109710/294144833-0f946a2d-5c0d-42e2-ba4e-6c7984bf97eb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM0MzA1NTAsIm5iZiI6MTcyMzQzMDI1MCwicGF0aCI6Ii82MTA5NzEwLzI5NDE0NDgzMy0wZjk0NmEyZC01YzBkLTQyZTItYmE0ZS02Yzc5ODRiZjk3ZWIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MTJUMDIzNzMwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTAzYzI2MTVhMWM0YTk0MmMyOGQ0M2I4MTQwMGNmNGEwZjc4NTIyNzA0MTE2YzRlN2ExZmUzMjc4ZGVlZDY5ZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.PzYvQsF8F7sW4mcxc_XfIrn-G4TAaPNW3uMdcnMMPC0)
✅ Review checklist
Please ensure the following are true before merging: