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

Chore: Eslint automatic fixes #670

Merged
merged 4 commits into from
Jun 19, 2024
Merged

Chore: Eslint automatic fixes #670

merged 4 commits into from
Jun 19, 2024

Conversation

tuliomir
Copy link
Contributor

@tuliomir tuliomir commented Jun 13, 2024

Acceptance Criteria

  • All automatic adjustments by prettier should be applied
  • All automatic fixes by eslint --fix should be applied
  • A few manually implemented fixes for Typescript errors revealed by the automatic changes ( 5803f3e )
  • A necessary adaptation in a function call because its type was revealed to be incorrect by eslint --fix ( 81c994d )

Security Checklist

  • 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.

@tuliomir tuliomir self-assigned this Jun 13, 2024
@tuliomir tuliomir force-pushed the feat/eslint-configs branch 2 times, most recently from 2e2ac6d to 9c8e433 Compare June 14, 2024 00:08
Base automatically changed from feat/eslint-configs to master June 17, 2024 21:25
token: '00',
changeAddress: null
}, options);
changeAddress: undefined,
Copy link
Contributor Author

@tuliomir tuliomir Jun 17, 2024

Choose a reason for hiding this comment

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

Passing a changeAddress as null was not expected by the sendManyOutputsTransaction method and had to be changed to undefined to comply with the expected type changeAddress?: string;. Otherwise the build phase would break.

The tests had to be changed accordingly. Since this is a static type issue, it's not expected that it will cause any issues with the wallet-lib consumers.

Notes

  1. Another alternative solution would be adding null to the valid types for this parameter: changeAddress?: string | null.

  2. This was previously not failing because instead of a simple object using the spread operator, the Object.assign() method was being used to build the parameters, bypassing the typescript checkers.

Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 74.38424% with 104 lines in your changes missing coverage. Please review.

Project coverage is 79.67%. Comparing base (76bb097) to head (81c994d).

Files Patch % Lines
src/api/wallet.js 11.62% 38 Missing ⚠️
src/api/txApi.js 42.30% 15 Missing ⚠️
src/new/sendTransaction.ts 75.00% 12 Missing ⚠️
src/api/metadataApi.ts 0.00% 8 Missing ⚠️
src/nano_contracts/builder.ts 66.66% 6 Missing ⚠️
src/models/create_token_transaction.ts 58.33% 5 Missing ⚠️
src/config.ts 75.00% 3 Missing ⚠️
src/new/wallet.js 96.05% 3 Missing ⚠️
src/models/partial_tx.ts 92.59% 2 Missing ⚠️
src/models/transaction.ts 91.66% 2 Missing ⚠️
... and 7 more
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #670       +/-   ##
===========================================
+ Coverage   62.79%   79.67%   +16.88%     
===========================================
  Files          77       77               
  Lines        5886     5920       +34     
  Branches     1229     1280       +51     
===========================================
+ Hits         3696     4717     +1021     
+ Misses       2094     1185      -909     
+ Partials       96       18       -78     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tuliomir tuliomir marked this pull request as ready for review June 17, 2024 22:07
@tuliomir tuliomir removed the request for review from pedroferreira1 June 18, 2024 20:29
@tuliomir tuliomir merged commit 3e92a73 into master Jun 19, 2024
4 checks passed
@tuliomir tuliomir deleted the chore/eslint-autofixes branch June 19, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants