Skip to content

refactor: we should expect one output for each data instead of an array of data outputs #34

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

Merged
merged 26 commits into from
Apr 1, 2025

Conversation

andreabadesso
Copy link
Collaborator

@andreabadesso andreabadesso commented Mar 20, 2025

Acceptance Criteria

  • We should expect a single data string in the outputs instead of an array of strings

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged
  • Make sure either the unit tests and/or the QA tests are capable of testing the new features
  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@andreabadesso andreabadesso self-assigned this Mar 20, 2025
@andreabadesso andreabadesso added the enhancement New feature or request label Mar 20, 2025
@andreabadesso andreabadesso moved this from Todo to In Progress (Done) in Hathor Network Mar 20, 2025
type?: string;
data?: string[];
}>,
outputs: preparedTx.outputs,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bug, we were always sending params.outputs, so we change output would never reach our client to review

@andreabadesso andreabadesso changed the title feat: one output per data refactor: we should expect one output for each data instead of an array of data outputs Mar 20, 2025
@andreabadesso andreabadesso force-pushed the feat/one-output-per-data branch from 65707c1 to aeda3c6 Compare March 20, 2025 21:39
@github-project-automation github-project-automation bot moved this from In Progress (Done) to In Review (WIP) in Hathor Network Mar 20, 2025
@@ -61,6 +61,11 @@ describe('sendTransaction', () => {
address: 'testAddress',
token: '00',
}],
outputs: [{
address: 'testAddress',
value: BigInt(100),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't all values be bigint? Should we change the input value as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we should, done

@@ -61,6 +61,11 @@ describe('sendTransaction', () => {
address: 'testAddress',
token: '00',
}],
outputs: [{
address: 'testAddress',
value: BigInt(100),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not 100n?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored everywhere to use n instead of BigInt

@r4mmer r4mmer moved this from In Review (WIP) to In Review (Done) in Hathor Network Mar 24, 2025
@andreabadesso andreabadesso moved this from In Review (Done) to In Progress (WIP) in Hathor Network Mar 25, 2025
@andreabadesso andreabadesso force-pushed the feat/one-output-per-data branch from 6d8f3e4 to 76d2f94 Compare March 27, 2025 12:48
@github-project-automation github-project-automation bot moved this from In Progress (WIP) to In Review (WIP) in Hathor Network Mar 27, 2025
@andreabadesso andreabadesso moved this from In Review (WIP) to In Review (Done) in Hathor Network Mar 27, 2025
@andreabadesso andreabadesso changed the base branch from feat/bigint-support to master April 1, 2025 13:14
@andreabadesso andreabadesso merged commit 4e81cb8 into master Apr 1, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Apr 1, 2025
@andreabadesso andreabadesso deleted the feat/one-output-per-data branch April 1, 2025 13:17
@andreabadesso andreabadesso moved this from Waiting to be deployed to Done in Hathor Network May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants