soroban-cli icon indicating copy to clipboard operation
soroban-cli copied to clipboard

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

Open TomMD opened this issue 1 year ago • 8 comments
trafficstars

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 avatar Oct 30 '24 22:10 TomMD

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

willemneal avatar Oct 30 '24 22:10 willemneal

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.

leighmcculloch avatar Oct 31 '24 02:10 leighmcculloch

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

janewang avatar Nov 05 '24 21:11 janewang

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[bot] avatar Dec 06 '24 18:12 github-actions[bot]

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[bot] avatar Jan 08 '25 18:01 github-actions[bot]

We should use stroops and update the details

janewang avatar Jan 10 '25 17:01 janewang

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

github-actions[bot] avatar Feb 09 '25 18:02 github-actions[bot]

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

github-actions[bot] avatar Mar 12 '25 18:03 github-actions[bot]

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

github-actions[bot] avatar May 16 '25 18:05 github-actions[bot]

is this still needed? @janewang

jeesunikim avatar Jun 18 '25 00:06 jeesunikim

If no one fixed this bug, this issue is still relevant

janewang avatar Jun 18 '25 00:06 janewang