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

txns: Uses sp.min_fee if available #530

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

jannotti
Copy link
Contributor

Rather than use a hard coded constant for min_fee, use the one that is returned in SuggestedParams if available.

Since some people may create a SuggestedParams by hand rather than get one from server (because our APIs require one even though the caller may feel they "know better"), continue to use the constant if the sp.min_fee is None.

First noted by @plasmatech8 in #299

Rather than use a hard coded constant for min_fee, use the one that is
returned in SuggestedParams if available.

Since some people may create a SuggestedParams by hand rather than get
one from server (because our APIs require one even though the caller
may feel they "know better"), continue to use the constant if the
sp.min_fee is None.
@jannotti jannotti changed the title Uses sp.min_fee if available txns: Uses sp.min_fee if available Jan 22, 2024
Copy link
Member

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good change, and I'm currently doing something very similar to the javascript v3 branch (except there I'm willing to go a step further and require min fee in the suggested params object, since it's a new major version. I will probably leave the constant exposed, but it wouldn't be used internally at all)

algosdk/transaction.py Outdated Show resolved Hide resolved
@jannotti jannotti requested a review from gmalouf January 22, 2024 20:47
@jannotti jannotti merged commit 9383b8b into algorand:develop Jan 23, 2024
12 checks passed
@jannotti jannotti removed the request for review from gmalouf January 23, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants