-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature/method get transaction only returns in wallet transactions #111
Feature/method get transaction only returns in wallet transactions #111
Conversation
value = inputTransaction["decoded"]["vout"][vin["vout"]]["value"] | ||
vinAddressBalances[address] = value | ||
# Converting all transaction details to str | ||
transactionDetails["fee"] = str(transactionDetails["fee"]) |
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.
No need to store the string value, just return the string value in response variable, "fee":str(transactionDetails["fee"])
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.
I disagree with this, because we are converting all elements in the array at once. I do not want to mix str variables with not-str ones in the same array.
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 thing is that the behaviour is the same if you delete this line and add "fee":str(transactionDetails["fee"])
in line 434
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.
After the requested changes of @swapper-pegasus this can be merged
Thanks @bridgedragon , beautiful code!
Description
The method getTransaction has been standardized to be run for any transaction (not only in-wallet ones).
Fixes #88
Dependencies (if any)
Type of change
Good practices to consider