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 selecting transactions by index #1033

Merged
merged 5 commits into from
Aug 17, 2023
Merged

Conversation

DaughterOfMars
Copy link

Description of change

This PR adds the ability to select transactions in the CLI account by index as well as ID.

Links to any relevant issues

Closes #659

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

Account "tedbundy": tx --help
Show the details of a transaction

Usage: Account: transaction <SELECTOR>

Arguments:
  <SELECTOR>  Selector for transaction. Either by ID (e.g. 0x84fe6b1796bddc022c9bc40206f0a692f4536b02aa8c13140264e2e01a3b7e4b) or index

Options:
  -h, --help     Print help
  -V, --version  Print version

Account "tedbundy": tx 0
No transaction found
Account "tedbundy": tx 0x84fe6b1796bddc022c9bc40206f0a692f4536b02aa8c13140264e2e01a3b7e4b
No transaction found
Account "tedbundy": tx 0x84fe6b1796bddc022c9bc40206f0a692f4536b02aa8c13140264e2e01a3b7e
error: invalid value '0x84fe6b1796bddc022c9bc40206f0a692f4536b02aa8c13140264e2e01a3b7e' for '<SELECTOR>': block error: hex error: Invalid hex string length for slice: expected 64 got 62

For more information, try '--help'.

Account "tedbundy": tx bleh
error: invalid value 'bleh' for '<SELECTOR>': block error: hex error: Invalid hex prefix: expected `0x` but got `bl`

For more information, try '--help'.

Account "tedbundy": tx 456
No transaction found

Copy link
Member

@thibault-martinez thibault-martinez left a comment

Choose a reason for hiding this comment

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

CLI changelog

Co-authored-by: Thibault Martinez <[email protected]>
Copy link
Member

@Thoralf-M Thoralf-M left a comment

Choose a reason for hiding this comment

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

Should we already update https://github.com/iotaledger/iota-wiki/edit/main/shimmer/docs/cli-wallet/docs/03_account.md with this or only after a new release?

@thibault-martinez
Copy link
Member

Should we already update https://github.com/iotaledger/iota-wiki/edit/main/shimmer/docs/cli-wallet/docs/03_account.md with this or only after a new release?

I'd say after, otherwise it doesn't match

@thibault-martinez thibault-martinez merged commit af19a14 into 1.1 Aug 17, 2023
8 checks passed
@thibault-martinez thibault-martinez deleted the feat/tx-by-index branch August 17, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants