Skip to content
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

fix: cap stx contract call fees #722

Merged
merged 3 commits into from
Dec 19, 2023
Merged

Conversation

teebszet
Copy link
Member

@teebszet teebszet commented Dec 19, 2023

πŸ”˜ PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Enhancement
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

πŸ“œ Background

stackerDAO reported really high fees when stacking via their dapp here: https://app.stackingdao.com/stack

we are taking fee estimates from the hiro endpoint https://api.hiro.so/v2/fees/transaction,
but the endpoint currently responds with really high estimates (~50STX).

this PR will set the fee capped at the threshold determined from our xverse-api (currently 1STX)

depends on: secretkeylabs/xverse-core#324

πŸ”„ Changes

  • fix: enforce a cap on the STX fee for contract function calls (stacking on stackerDAO)

Impact:

  • Explain the broader impact of these changes.
  • How it improves performance, fixes bugs, adds functionality, etc.

πŸ–Ό Screenshot / πŸ“Ή Video

image

βœ… Review checklist

Please ensure the following are true before merging:

  • Code Style is consistent with the project guidelines.
  • Code is readable and well-commented.
  • No unnecessary or debugging code has been added.
  • Security considerations have been taken into account.
  • The change has been manually tested and works as expected.
  • Breaking changes and their impacts have been considered and documented.
  • Code does not introduce new technical debt or issues.

Copy link

@teebszet teebszet merged commit d051f5b into develop Dec 19, 2023
2 checks passed
This was referenced Dec 19, 2023
teebszet added a commit that referenced this pull request Dec 20, 2023
* fix: cap stx contract call fees (#722)

* fix: cap stx contract call fees

* chore: update core version

* chore: bump to core 6.0.1

* release: v0.26.2

---------

Co-authored-by: Tim Man <tim@secretkeylabs.com>
Co-authored-by: GitHub Actions Bot <>
dhriaznov pushed a commit that referenced this pull request Dec 21, 2023
* fix: cap stx contract call fees

* chore: update core version

* chore: bump to core 6.0.1
dhriaznov added a commit that referenced this pull request Jan 11, 2024
* [ENG-3436] chore: Make some code refactoring for RBF in the extension

* Make some code fixes

* Make some code fixes

* fix: put speed up screen in another scrollable container

* Make some code tweaks according to PR review comments

* Remove the unused import

* fix nonce not being set correctly for tx requests

* fix nonce calc persisted

* [ENG-3455] fix: Fix the sharp fee change on tx confirmation

* release v0.26.1

* package-lock update

* fix: cap stx contract call fees (#722)

* fix: cap stx contract call fees

* chore: update core version

* chore: bump to core 6.0.1

* [ENG-3474] feat: Make UI for STX RBF in the extension

* Add the `useRbfTransactionData` hook

* Add some logic for stx rbf

* Add some logic for stx rbf

* Improve the stx rbf logic

* Improve the stx rbf logic

* Add the insufficient funds check

* Add ledger signing and broadcasting for stx rbf

* Add the fee cap

* Allow decimal fee for custom stx rbf

* Fix the loading state in the rbf hook

* Remove the todo comment

* Remove the `convertStringHexToBufferReader` helper func

* Round up the minimum rbf fee for stx txs

* Create separate btc and stx rbf components

* Remove the old todo comment

* improve the stx rbf logic

* Make some small code tweaks after the PR review

* Pass the seedVault.getSeed func

* Update the useRbfTransactionData hook

* Update the rbf logic

---------

Co-authored-by: Tim Man <tim@secretkeylabs.com>
Co-authored-by: Mahmoud Aboelenein <mahmoud@secretkeylabs.com>
Co-authored-by: Yukan <yukanliao@gmail.com>
@teebszet teebszet deleted the fix/cap-contract-call-fees branch February 26, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants