-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
WIP: tx generate only #3287
WIP: tx generate only #3287
Conversation
Looks like it's still failing tests...
|
client/utils/rest.go
Outdated
accNumber, seq uint64, fees sdk.Coins, genOnly, simulate bool) BaseReq { | ||
|
||
return BaseReq{ | ||
Name: strings.TrimSpace(name), | ||
Password: password, | ||
From: strings.TrimSpace(from), |
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.
from should be an sdk.AccAddress
to avoid checking if the string is a valid address
Codecov Report
@@ Coverage Diff @@
## develop #3287 +/- ##
===========================================
- Coverage 55.18% 55.16% -0.03%
===========================================
Files 134 134
Lines 9526 9517 -9
===========================================
- Hits 5257 5250 -7
+ Misses 3938 3936 -2
Partials 331 331 |
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.
utACK
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.
Changes look good @faboweb and @fedekunze
utils.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) | ||
return | ||
var from sdk.AccAddress | ||
if req.BaseReq.GenerateOnly { |
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.
So if I'm reading this right, on generate only it just adds a From
address to the base req and then will CompleteAndBroadcastTxREST
right? If so this would need some more modification.
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 takes the from address from base_req instead of resolving it from the username.
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.
Plus it doesn't complete and broadcast it yes. Probably needs more modification. Can someone take this over who is opinionated about the SDK code?
Co-Authored-By: faboweb <[email protected]>
@alessio or @alexanderbez can you work on this if any of you have time ? |
I'll pick it up sure 👍 |
Thx @alexanderbez, would have done it myself but I think you know better how you want this to be designed. Happy to help if you need any. |
closes: #3284
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added entries in
PENDING.md
with issue #rereviewed
Files changed
in the github PR explorerFor Admin Use: