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

fix: created btc dust amount constant and renaming #2327

Merged
merged 5 commits into from
Jun 18, 2024

Conversation

ws4charlie
Copy link
Contributor

Description

The temporary hotfix for dust btc amount is in zetaclient. The fix needs to be done in zetacore to prevent dust CCTX from registration (#2326). The PR only ported the constant and remaining.

  • Renamed BtcDustOffset -> BtcNonceMarkOffset and created BTCWithdrawalDustAmount constant for zetacore usage.

Closes:

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Include instructions and any relevant details so others can reproduce.

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Checklist:

  • I have added unit tests that prove my fix feature works

Copy link

github-actions bot commented Jun 6, 2024

!!!WARNING!!!
nosec detected in the following files: pkg/chains/conversion.go

Be very careful about using #nosec in code. It can be a quick way to suppress security warnings and move forward with development, it should be employed with caution. Suppressing warnings with #nosec can hide potentially serious vulnerabilities. Only use #nosec when you're absolutely certain that the security issue is either a false positive or has been mitigated in another way.

Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203
Broad #nosec annotations should be avoided, as they can hide other vulnerabilities. The CI will block you from merging this PR until you remove #nosec annotations that do not target specific rules.

Pay extra attention to the way #nosec is being used in the files listed above.

@github-actions github-actions bot added the nosec label Jun 6, 2024
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.06%. Comparing base (14bbf10) to head (c317dfb).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2327   +/-   ##
========================================
  Coverage    68.06%   68.06%           
========================================
  Files          299      299           
  Lines        18971    18971           
========================================
  Hits         12913    12913           
  Misses        5421     5421           
  Partials       637      637           
Files Coverage Δ
pkg/chains/chains.go 100.00% <100.00%> (ø)
pkg/chains/conversion.go 100.00% <100.00%> (ø)

Copy link
Member

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

It doesn't seem the change modify any logic in ZetaClient did we forget to do

2000+BTCWithdrawalDustAmount

?

@ws4charlie
Copy link
Contributor Author

It doesn't seem the change modify any logic in ZetaClient did we forget to do

2000+BTCWithdrawalDustAmount

?

The 2nd commit: b40b511
The 2nd commit according to Panruo's comment: 8a34fbe

@lumtis
Copy link
Member

lumtis commented Jun 18, 2024

Does this fix #2326?

@ws4charlie ws4charlie requested a review from swift1337 as a code owner June 18, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants