Skip to content
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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

arobsn
Copy link

@arobsn arobsn commented Nov 29, 2021

This PR adds two changes:

  • new /api/v2/tx/boxes endpoint, where given an array of txHashs it returns all contained boxes in transactions
  • add concise parameter to /api/v2/tx/history, if this parameter is set to true the endpoint will not include inputs, dataInputs and outputs at the response

@arobsn arobsn changed the title Add tx/boxes endpoint and add omitBoxes param to tx/history Add tx/boxes endpoint and add 'concise' param to tx/history Nov 30, 2021
@vsubhuman vsubhuman added this to the 1.1.0 milestone Dec 1, 2021
@vsubhuman
Copy link
Contributor

@pedromtcosta @ozgrakkurt , please review

@vsubhuman
Copy link
Contributor

@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,

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.

Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants