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

Transaction Details View for CLI. #83

Merged
merged 16 commits into from
Dec 30, 2018
Merged

Transaction Details View for CLI. #83

merged 16 commits into from
Dec 30, 2018

Conversation

barisere
Copy link
Contributor

Partial solution to #69

@barisere
Copy link
Contributor Author

Here's the current output of the get-transaction command.

$ ./dcrcli -t -C dcrcli.conf get-transaction c3b6b67284ab25208008838e6cbb965c0da1fd33f57e14257b24d00579487ff2
Transaction       c3b6b67284ab25208008838e6cbb965c0da1fd33f57e14257b24d00579487ff2 
Confirmations     17194                                                            
Included in block f27f487905d0247b25147ef533fda10d5c96bb6c8e8308802025ab8472b6b6c3 
Type              REGULAR                                                          
Total sent        200 DCR                                                          
Time              Wed Nov 28, 2018 9:13PM                                          
Size              3.4 kB                                                           
Fee               0.003407 DCR                                                     
Rate              0.00100948 DCR/kB

Compare this output to that on decred explorer. The block has displayed here is incorrect (it looks like a byte-reversed copy of the transaction hash). Is it possible that dcrwallet is returning incorrect data?
The time shown in this output is approximate. That may be because time.Unix accepts two arguments, but the second argument (the nanoseconds) was not provided.

@barisere
Copy link
Contributor Author

Here's how the current output of get-transaction --detailed looks.

$ ./dcrcli -t -C dcrcli.conf get-transaction --detailed dac27eb8b0238fb3a69b19dcb9254f865ae6df6d7ef7ecbd1bdc828ed0c6ed45
Transaction       dac27eb8b0238fb3a69b19dcb9254f865ae6df6d7ef7ecbd1bdc828ed0c6ed45 
Confirmations     35                                                               
Included in block 45edc6d08e82dc1bbdecf77e6ddfe65a864f25b9dc199ba6b38f23b0b87ec2da 
Type              REGULAR                                                          
Total sent        0.000253 DCR                                                     
Time              Fri Dec 28, 2018 7:54AM                                          
Size              0.3 kB                                                           
Fee               0.000253 DCR                                                     
Rate              0.00100396 DCR/kB                                                

Inputs                                                             
74448f25f85bb8a49c5b84695f3f95e9f8deaf96fe8edc5069f5cce2379400d2:0 0.998494 DCR 

Outputs                             
TsdCKdRnJ354Y7sHhRdbbGs3SrBP4qfXCbR pubkeyhash 0.997241 DCR (internal) 
TsfMhvoGbn7RVq3zKUJ9obE8ut7JFrnGwgT pubkeyhash 0.001 DCR 

Copy link
Contributor

@itswisdomagain itswisdomagain left a comment

Choose a reason for hiding this comment

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

Preliminary review. Will do a deep dive shortly and provide more feedback

cli/commands/commands.go Outdated Show resolved Hide resolved
cli/commands/get-transaction.go Outdated Show resolved Hide resolved
cli/commands/get-transaction.go Outdated Show resolved Hide resolved
walletrpcclient/helpers.go Outdated Show resolved Hide resolved
walletrpcclient/types.go Outdated Show resolved Hide resolved
walletrpcclient/types.go Outdated Show resolved Hide resolved
walletrpcclient/walletrpcclient.go Outdated Show resolved Hide resolved
@itswisdomagain itswisdomagain changed the base branch from master to new December 30, 2018 17:15
@itswisdomagain itswisdomagain changed the base branch from new to master December 30, 2018 17:15
walletrpcclient/walletrpcclient.go Outdated Show resolved Hide resolved
walletrpcclient/walletrpcclient.go Outdated Show resolved Hide resolved
walletrpcclient/walletrpcclient.go Show resolved Hide resolved
walletrpcclient/walletrpcclient.go Outdated Show resolved Hide resolved
walletrpcclient/walletrpcclient.go Outdated Show resolved Hide resolved
cli/commands/get-transaction.go Outdated Show resolved Hide resolved
cli/commands/get-transaction.go Outdated Show resolved Hide resolved
cli/commands/get-transaction.go Outdated Show resolved Hide resolved
cli/commands/get-transaction.go Outdated Show resolved Hide resolved
cli/commands/get-transaction.go Outdated Show resolved Hide resolved
@itswisdomagain
Copy link
Contributor

itswisdomagain commented Dec 30, 2018

Regarding the output of the detailed command, I particularly like the simplicity of dcrandroid:
screenshot 2018-12-27 at 9 45 39 pm

For Inputs, we should probably display amounts first. It's more friendly to the eyes.
For outputs, Amount Address (internal/external) does it as well.

Also, for detailed view, title the first section:

General Info
Hash        dac27eb8b0238fb3a69b19dcb9254f865ae6df6d7ef7ecbd1bdc828ed0c6ed45 
Confirmations     35                                                               
Included in block 45edc6d08e82dc1bbdecf77e6ddfe65a864f25b9dc199ba6b38f23b0b87ec2da 
Type              REGULAR                                                          
Total sent        0.000253 DCR                                                     
Time              Fri Dec 28, 2018 7:54AM                                          
Size              0.3 kB                                                           
Fee               0.000253 DCR                                                     
Rate              0.00100396 DCR/kB                                                

Inputs                                                             
74448f25f85bb8a49c5b84695f3f95e9f8deaf96fe8edc5069f5cce2379400d2:0 0.998494 DCR 

Outputs                             
TsdCKdRnJ354Y7sHhRdbbGs3SrBP4qfXCbR pubkeyhash 0.997241 DCR (internal) 
TsfMhvoGbn7RVq3zKUJ9obE8ut7JFrnGwgT pubkeyhash 0.001 DCR 

@itswisdomagain itswisdomagain merged commit 1b65a81 into raedahgroup:master Dec 30, 2018
@raedah raedah mentioned this pull request Dec 30, 2018
@itswisdomagain itswisdomagain moved this from For Review to Done in godcr board Dec 30, 2018
itswisdomagain added a commit that referenced this pull request Jan 9, 2019
Transaction Details View for CLI.

Former-commit-id: 1b65a81
@barisere barisere deleted the transaction-details-view-cli branch January 10, 2019 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants