-
Notifications
You must be signed in to change notification settings - Fork 0
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(api): Ethereum transactions API #847
Conversation
✅ Deploy Preview for quantumbridge ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
52f19d8
to
cb710f7
Compare
apps/server/src/ethereum/services/EthereumTransactionsService.ts
Outdated
Show resolved
Hide resolved
LGTM but let's hold this PR for now. Pending adding JWT/security to this API |
d7a86ac
to
1b96dc5
Compare
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.
Can we add tests that it only returns the transactions that are within the specified fromDate
and toDate
?
Added mock transaction database entries |
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.
LGTM
9d36277
to
6b25afe
Compare
readonly timestamp: string, | ||
readonly status: string, | ||
readonly sendTransactionHash: string | null, | ||
readonly unconfirmedSendTransactionHash: string | null, |
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.
@jordankzf Note, if you want to make it optional just add ?
. To check on another PR
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.
Addressed here: #847 (comment)
import { buildTestConfig, TestingModule } from '../TestingModule'; | ||
|
||
function verifyFormat(parsedPayload: TransactionsDto) { | ||
expect(parsedPayload).toHaveProperty('txHash'); |
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 this test can be improved. We need to check if the type is correct. Let's say, we updated the schema. All consumers of this API will break. So we need to know if that happens. Anyway, we can fix it on another PR.
What this PR does / why we need it:
Adds
/ethereum/transactions?fromDate=YYYY-MM-DD&toDate=YYYY-MM-DD
endpointWhich issue(s) does this PR fixes?:
Fixes #834
Additional comments?:
Developer Checklist: