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

Pretty-print: print token's symbol after the amount #3784

Merged
merged 2 commits into from
Mar 16, 2021

Conversation

tjanez
Copy link
Member

@tjanez tjanez commented Mar 16, 2021

Additionally, change transaction's pretty-printer to transaction's method name and body before the rest.

Example output before this change for oasis-node consensus show_tx CLI command:

Hash: 36c5da997aed1065acd726a9358578ad94588efee9b60585cd1dcb0130894d19
Signer: 8E6DSXn0elXyIF9pYfoSg6+/LK9HeNONJia2rdD3Ozg=
        (signature: cdqMW6aYDUJcYwxcKuC7eY6ycaYGxNQ4jxMdw9U9yxIgPTrkEGlzIQn7RdmaGbyyXc5S5/N1pKWEQsQbli7sBw==)
Content:
  Nonce:  0
  Fee:
    Amount: ROSE 0.0
    Gas limit: 2000
    (gas price: ROSE 0.0 per gas unit)
  Method: staking.Withdraw
  Body:
    From:   oasis1qzn7ztfjlc962yy5yz50zt6tedl60p0aw5n98s0k
    Amount: ROSE 300.0
Other info:
  Genesis document's hash: e2a76b23e48639d7e08c961af77aaf55498c90fd01b70ec996d8f1906869b0d1

Example output after this change for oasis-node consensus show_tx CLI command:

Hash: 36c5da997aed1065acd726a9358578ad94588efee9b60585cd1dcb0130894d19
Signer: 8E6DSXn0elXyIF9pYfoSg6+/LK9HeNONJia2rdD3Ozg=
        (signature: cdqMW6aYDUJcYwxcKuC7eY6ycaYGxNQ4jxMdw9U9yxIgPTrkEGlzIQn7RdmaGbyyXc5S5/N1pKWEQsQbli7sBw==)
Content:
  Method: staking.Withdraw
  Body:
    From:   oasis1qzn7ztfjlc962yy5yz50zt6tedl60p0aw5n98s0k
    Amount: 300.0 ROSE
  Nonce:  0
  Fee:
    Amount: 0.0 ROSE
    Gas limit: 2000
    (gas price: 0.0 ROSE per gas unit)
Other info:
  Genesis document's hash: e2a76b23e48639d7e08c961af77aaf55498c90fd01b70ec996d8f1906869b0d1

@tjanez tjanez force-pushed the tjanez/symbol-and-txn-pprint branch from e8ea6d5 to 1157e0d Compare March 16, 2021 12:44
@tjanez tjanez enabled auto-merge March 16, 2021 12:44
tjanez added 2 commits March 16, 2021 14:14
This is more consistent with how others present token amounts.
This is more intuitive and enables people to discover the transaction's
main information quicker.
@tjanez tjanez force-pushed the tjanez/symbol-and-txn-pprint branch from 1157e0d to 25828b4 Compare March 16, 2021 13:14
@tjanez tjanez merged commit 9e0190b into master Mar 16, 2021
@tjanez tjanez deleted the tjanez/symbol-and-txn-pprint branch March 16, 2021 13:49
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.

2 participants