Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(wallets.py): add wallet history command #1638
feat(wallets.py): add wallet history command #1638
Changes from 3 commits
5421c64
ff220ff
2fda1d3
fd35c28
458fa74
cfea0c5
160d1db
11d5ba7
d4c535e
b066dca
c397b55
81b0f14
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is somewhat cumbersome to enter the password each time to simply get the coldkey address, which is not exactly private data.
Suggestion:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally weary of unbounded
while True
statements in python. This technically should terminate on the desired condition, but may want to explicitly put the exit condition in this line and/or specify some other conditions for exiting. For example, if there is significant txn volume, we may want to limit the output ton
txns.For example, adding a
max_txn_history
that we exit upon reaching:What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think it will be a better approach. Will be fixing this in the next commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You not need while. Change 10 to 1000 or more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alex0500 removed while and set max_txn to 1000.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current amount displayed is in
rao
, and displaying intao
may be more user-friendly. It's a simple divide by1e9
Suggestion:
May want to do some error handling if the value cannot be converted to an
int
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also done. Tested it for the below values,
2
2.9
"2"
"2.989767"
Any invalid integer will throw an error, in that case, I am using it as it as. Any other suggestions on the same?