-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add tx/boxes endpoint and add 'concise' param to tx/history #39
base: master
Are you sure you want to change the base?
Conversation
@pedromtcosta @ozgrakkurt , please review |
@ozgrakkurt , this is similar to the change you been making on the cardano backend, separate endpoint to get inputs and outputs, plus this includes a flag for the history endpoint to not include the same fields that can be received separately |
src/api.js
Outdated
inputs: tx.inputs, | ||
dataInputs: tx.dataInputs, | ||
outputs: tx.outputs, | ||
inputs: input.concise ? undefined : tx.inputs, |
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 might be confusing since I wouldn't expect a variable to be assigned to undefined
explicitly. I would expect null
instead since undefined
means there is no such variable, but null
means the variable isn't filled. Also assigning undefined
to something is weird since it is not a real value.
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 are right, sorry about that, fixed!
This PR adds two changes:
/api/v2/tx/boxes
endpoint, where given an array oftxHashs
it returns all contained boxes in transactionsconcise
parameter to/api/v2/tx/history
, if this parameter is set totrue
the endpoint will not includeinputs
,dataInputs
andoutputs
at the response