Skip to content

Fix for Unused variable, import, function or class#14

Open
Lawrence Lucas Large (LukeLarge) wants to merge 3 commits intomainfrom
finding-autofix-67c3124b
Open

Fix for Unused variable, import, function or class#14
Lawrence Lucas Large (LukeLarge) wants to merge 3 commits intomainfrom
finding-autofix-67c3124b

Conversation

@LukeLarge
Copy link
Copy Markdown

In general, to fix an unused variable warning, either remove the variable (and its initialization) if it is not needed, or use it in a meaningful assertion / logic if it was intended to be used. Here, in the test it('extension should be able to add another extension when sig auth is disabled', ...), stateBefore is never used, and there are already adequate assertions covering behavior (extensions count, transaction properties). The simplest, least invasive fix is to delete the const stateBefore = await getWalletData(); line.

Concretely, in tests/WalletW5.spec.ts around line 2778, remove the declaration of stateBefore. No imports or additional definitions are required, and no other code in the snippet references stateBefore, so no further changes are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Lawrence Lucas Large <162439255+LukeLarge@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 10, 2026 07:49
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fix for Unused variable, import, function or class
#14

@LukeLarge Lawrence Lucas Large (LukeLarge) marked this pull request as ready for review March 10, 2026 07:51
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

Removes an unused variable assignment in a Wallet v5 external test to address an unused-variable warning without changing test behavior.

Changes:

  • Deletes the unused stateBefore variable initialization in the specified test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fix for Unused variable, import, function or class
#14

Copilot AI review requested due to automatic review settings March 21, 2026 23:36
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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants