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

Allow passing gasPrice (optional) to getTransactionCost #3607

Closed
danielbate opened this issue Jan 22, 2025 · 1 comment
Closed

Allow passing gasPrice (optional) to getTransactionCost #3607

danielbate opened this issue Jan 22, 2025 · 1 comment
Assignees
Labels
feat Issue is a feature

Comments

@danielbate
Copy link
Member

danielbate commented Jan 22, 2025

In the Fuel Wallet, the user is allowed to pass a custom gas limit at tx approval. Using this new gas limit, it will then calculate the fee. Should this fee be greater than that set initially against the transaction request, it estimates and funds the entire transaction (via getTransactionCost). Source.

Within this flow, the SDK is fetching the gas price twice:

  1. Once for fee calculation
  2. And again to estimate and fund the transaction

If we allow passing of gasPrice at getTransactionCost we can reduce the redundant gas price call. This is already being done in estimateTxGasAndFee for the same reason.

Relates to #3577

@danielbate danielbate added the feat Issue is a feature label Jan 22, 2025
@danielbate danielbate self-assigned this Jan 22, 2025
@danielbate
Copy link
Member Author

Closed by #3608

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Issue is a feature
Projects
None yet
Development

No branches or pull requests

1 participant