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

Deprecate or remove (EDIT(jcnelson): or fix) the /v2/fees/transfer endpoint #4752

Closed
diwakergupta opened this issue May 6, 2024 · 4 comments
Assignees
Labels
documentation Requires new or updates to our documentation enhancement Iterations on existing features or infrastructure. good first issue Appropriate for a new open source contribution.

Comments

@diwakergupta
Copy link
Member

Problem

Everyone should be using the /v2/fees/transaction for fee estimation. Unfortunately, not only does the /v2/fees/transfer endpoint still exist, it isn't even marked deprecated anywhere clearly (e.g. not in the openapi spec, not in this doc, not in the code )

This routinely confuses people, not least because looking at the endpoints alone (/v2/fees/transfer vs /v2/fees/transaction) it's impossible to tell the different without looking at the docs or code.

Desired solution

Deprecate or better yet, remove the outdated /v2/fees/transfer endpoint.

@diwakergupta diwakergupta added enhancement Iterations on existing features or infrastructure. good first issue Appropriate for a new open source contribution. documentation Requires new or updates to our documentation labels May 6, 2024
@jcnelson
Copy link
Member

jcnelson commented May 6, 2024

How about, since people apparently use this endpoint, we instead fix /v2/fees/transfer to do what it's supposed to do?

@diwakergupta
Copy link
Member Author

How about, since people apparently use this endpoint, we instead fix /v2/fees/transfer to do what it's supposed to do?

From being on the receiving end of a lot of questions / tech support requests around this, I'll just say one endpoint is better / less confusing than two.

@jcnelson
Copy link
Member

jcnelson commented May 6, 2024

If you're seeing people query this endpoint, then I think it's safe to assume that the questions / tech support requests aren't going to go away if we just disable it. They'll just ask why it broke.

The endpoint is indeed broken insofar as it returns incorrect data. However, it's straightforward to make it return correct data, since it can rely on the same machinery that /v2/fees/transaction uses. Also, it's a lot less clunky than /v2/fees/transaction if you're just sending a token-transfer -- it'll give you a scalar fee in response to a body-less GET request, as opposed to requiring you to serialize and POST your transaction to the node and then parse a JSON response.

I'll go ahead and fix it.

@jcnelson jcnelson self-assigned this May 6, 2024
jcnelson added a commit that referenced this issue May 6, 2024
…transaction fee for a STX-transfer from the cost estimators
@jcnelson jcnelson mentioned this issue May 6, 2024
@jcnelson
Copy link
Member

jcnelson commented May 6, 2024

Fixed: #4754

@jcnelson jcnelson changed the title Deprecate or remove the /v2/fees/transfer endpoint Deprecate or remove (EDIT(jcnelson): or fix) the /v2/fees/transfer endpoint May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Requires new or updates to our documentation enhancement Iterations on existing features or infrastructure. good first issue Appropriate for a new open source contribution.
Projects
Archived in project
Development

No branches or pull requests

2 participants