Skip to content

fix: typos identified by copilot#929

Open
Luisfc68 wants to merge 2 commits intoQA-Testfrom
fix-typos
Open

fix: typos identified by copilot#929
Luisfc68 wants to merge 2 commits intoQA-Testfrom
fix-typos

Conversation

@Luisfc68
Copy link
Copy Markdown
Collaborator

@Luisfc68 Luisfc68 commented Mar 6, 2026

What

Fix typos identifies by copilot in a separate PR

Why

N/A

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change
  • Documentation update
  • Refactoring (no functional changes, no api changes)
  • Performance improvement
  • Test updates
  • Security fix
  • Deployment/Infrastructure changes

Affected part of the project

  • Management UI / API
  • PegIn flow
  • PegOut flow
  • Utility scripts
  • Configuration files
  • Metrics and alerting

Related Issues

N/A

@Luisfc68 Luisfc68 requested a review from a team as a code owner March 6, 2026 16:21
@Luisfc68 Luisfc68 requested a review from Copilot March 6, 2026 16:21
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 6, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR corrects miswired RSK contract addresses in utility scripts by replacing accidental uses of the pegin address with the intended pegout and discovery contract addresses.

Changes:

  • Use env.Rsk.PegoutContractAddress when constructing the Pegout contract wrapper.
  • Use env.Rsk.DiscoveryAddress when constructing the Discovery contract wrapper.

Comment on lines 95 to 98
return rootstock.NewPegoutContractImpl(
rskClient,
env.Rsk.PeginContractAddress,
env.Rsk.PegoutContractAddress,
rootstock.NewPegoutContractAdapter(pegoutContract),
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

Current tests for CreatePegoutContract pass an env with PegoutContractAddress unset, so they won’t fail if the wrong env field is used (as happened previously). Consider updating the test to set a distinct PegoutContractAddress and assert contract.GetAddress() matches it, to prevent regressions.

Copilot uses AI. Check for mistakes.
Comment on lines 124 to 127
return rootstock.NewDiscoveryContractImpl(
rskClient,
env.Rsk.PeginContractAddress,
env.Rsk.DiscoveryAddress,
discoveryContract,
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

Current tests for CreateDiscoveryContract don’t set DiscoveryAddress, so they won’t catch regressions where the wrong env field is wired. Consider setting a non-empty DiscoveryAddress in the test and asserting contract.GetAddress() equals it.

Copilot uses AI. Check for mistakes.
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