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

Stellar tx new payment field of amount is orders of magnitude off. Update the helper text #1693

Open
TomMD opened this issue Oct 30, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@TomMD
Copy link
Contributor

TomMD commented Oct 30, 2024

stellar tx new payment says:

      --asset <ASSET>
          Asset to send, default native, e.i. XLM [default: native]
      --amount <AMOUNT>
          Amount of the aforementioned asset to send

This seems incorrect. The amount is actually defaulting to stroop and the amount is thus orders of magnitude different.

@TomMD TomMD added the bug Something isn't working label Oct 30, 2024
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Oct 30, 2024
@willemneal
Copy link
Member

This was copy/pasted from the docs:
https://developers.stellar.org/docs/learn/fundamentals/transactions/list-of-operations#payment

Parameters Type Description
Destination account ID Account address that receives the payment.
Asset asset Asset to send to the destination account.
Amount integer Amount of the aforementioned asset to send.

Would you prefer more detail? e.g. Amount of the aforementioned asset to send, in the case of XLM in units of stroop

@leighmcculloch
Copy link
Member

leighmcculloch commented Oct 31, 2024

The doc for the amount option should be improved and show what a value should look like.

In regards to the issue of whether the option should be a decimal or in stroops:

There's a UX argument for yes, it should be decimal 1.000000, or just 1, instead of a fixed point integer 1000000 because that's what users see in wallets and the consistency between the CLI and wallets would be less confusing.

But there's also a UX argument for consistency within the CLI, and other commands in the CLI already accept the integer form because in transactions and on the network amounts are always represented as integers. This is because the network actually only knows stroops, and any concept or conventions of decimal places is something added off chain. e.g.:

$ stellar contract invoke --id C... -- transfer --amount 1000000 ...

So I think we should opt for the latter, consistency within the CLI, and make the documentation much clearer.

@janewang janewang moved this from Backlog (Not Ready) to Todo (Ready for Dev) in DevX Nov 5, 2024
@janewang janewang assigned willemneal and unassigned willemneal Nov 5, 2024
@janewang
Copy link
Contributor

janewang commented Nov 5, 2024

Please also add to upstream docs because it was copy and pasted from there.

Copy link
Contributor

github-actions bot commented Dec 6, 2024

This issue is stale because it has been assigned for 30 days with no activity. It will be closed in 30 days unless the stale label is removed, and the assignee is removed or updated.

@github-actions github-actions bot added the stale label Dec 6, 2024
@janewang janewang removed the stale label Dec 6, 2024
Copy link
Contributor

github-actions bot commented Jan 8, 2025

This issue is stale because it has been assigned for 30 days with no activity. It will be closed in 30 days unless the stale label is removed, and the assignee is removed or updated.

@github-actions github-actions bot added the stale label Jan 8, 2025
@janewang janewang removed the stale label Jan 10, 2025
@janewang
Copy link
Contributor

We should use stroops and update the details

@janewang janewang changed the title Stellar tx new payment field of amount is orders of magnitude off. Stellar tx new payment field of amount is orders of magnitude off. Update the helper text Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo (Ready for Dev)
Development

No branches or pull requests

5 participants