-
Notifications
You must be signed in to change notification settings - Fork 1
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
httphandler: tss api endpoints #54
Conversation
adding semicolons
…ransaction_hash ...also remove outgoing/incoming_status and have one status column
commit fb807aa Author: gouthamp-stellar <goutham.patnaikuni@stellar.org> Date: Tue Sep 3 10:28:49 2024 -0700 remove the index on try_transaction_xdr and add column/index on try_transaction_hash ...also remove outgoing/incoming_status and have one status column commit 6fc0dc2 Author: gouthamp-stellar <goutham.patnaikuni@stellar.org> Date: Tue Sep 3 08:58:46 2024 -0700 missing , commit a9cf4e3 Author: gouthamp-stellar <goutham.patnaikuni@stellar.org> Date: Tue Sep 3 01:55:23 2024 -0700 make hash primary key instead of xdr commit c0f9d32 Author: gouthamp-stellar <goutham.patnaikuni@stellar.org> Date: Fri Aug 30 15:18:27 2024 -0700 moving all migrations to one file commit 2de9898 Author: gouthamp-stellar <goutham.patnaikuni@stellar.org> Date: Fri Aug 30 15:16:53 2024 -0700 adding semicolons adding semicolons commit 373c71a Author: gouthamp-stellar <goutham.patnaikuni@stellar.org> Date: Fri Aug 30 15:12:24 2024 -0700 update commit 3f9f9f0 Author: gouthamp-stellar <goutham.patnaikuni@stellar.org> Date: Fri Aug 30 15:12:00 2024 -0700 remove empty lines commit 9920f48 Author: gouthamp-stellar <goutham.patnaikuni@stellar.org> Date: Fri Aug 30 15:06:40 2024 -0700 TSS tables and the channel interface commit a58d519 Author: gouthamp-stellar <goutham.patnaikuni@stellar.org> Date: Fri Aug 30 10:55:22 2024 -0700 tables and interfaces for TSS
…and builds a transaction out of it
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.
Overall, LGTM.
} | ||
|
||
type Transaction struct { | ||
Operations []string `json:"operations"` |
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'd recommend we add validate
flag here too.
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.
Done
endpoint := "/tss/transactions" | ||
|
||
r := chi.NewRouter() | ||
//r.Get("/tss/{transactionhash}", handler.GetTransaction) |
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.
Should we remove this line?
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.
Done
assert.Equal(t, http.StatusOK, resp.StatusCode) | ||
assert.Empty(t, getTxResp.Hash) | ||
assert.Empty(t, getTxResp.XDR) | ||
assert.Empty(t, getTxResp.Status) |
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 think we could return 404 instead of 200 when the transaction hash doesn't exist.
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.
Done
if err != nil { | ||
httperror.InternalServerError(ctx, "unable to get transaction", err, nil, t.AppTracker).Render(w) | ||
return | ||
} |
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.
Just wondering, should we log the transaction hash explicitly here?
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.
Done
What
TSS API endpoints to
Why
For clients of TSS to be able to submit transactions and get a transaction that they submitted
Known limitations
N/A
Issue that this PR addresses
https://app.asana.com/0/1207947010297920/1208138733594341
Checklist
PR Structure
all
if the changes are broad or impact many packages.Thoroughness
Release