Skip to content

Fix undefined variable, redundant code, and duplicate ABI entry#30

Merged
Steake merged 2 commits intohotfixes-refixesfrom
copilot/sub-pr-29
Nov 19, 2025
Merged

Fix undefined variable, redundant code, and duplicate ABI entry#30
Steake merged 2 commits intohotfixes-refixesfrom
copilot/sub-pr-29

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 19, 2025

Addresses three code quality issues identified in PR #29 review:

Undefined variable reference

  • Explorer.svelte:567: networkLabel was referenced but not defined
  • Added import for getNetworkByChainId() and derive network name from handleChainId
  • Added network property to fallbackClaim for consistency

Redundant type checking

  • wordhandles.js:92: Ternary operator applied ethers.getBytes() in both branches
  • Simplified to single call: const bytes = ethers.getBytes(encoded);

Duplicate ABI definition

  • multichain.js:81: getTotalClaims() function signature duplicated from line 57
  • Removed duplicate entry
- const bytes = typeof encoded === 'string' ? ethers.getBytes(encoded) : ethers.getBytes(encoded);
+ const bytes = ethers.getBytes(encoded);

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…cate ABI

Co-authored-by: Steake <530040+Steake@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for AddressHandleRegistry smart contract Fix undefined variable, redundant code, and duplicate ABI entry Nov 19, 2025
Copilot AI requested a review from Steake November 19, 2025 22:01
@Steake Steake marked this pull request as ready for review November 19, 2025 22:02
Copilot AI review requested due to automatic review settings November 19, 2025 22:02
Copy link
Copy Markdown
Contributor

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 pull request addresses three code quality issues identified in a previous code review:

  • Undefined variable fix: Adds proper import and definition of networkLabel in Explorer.svelte
  • Redundant code removal: Simplifies ternary operator in wordhandles.js that applied the same function in both branches
  • Duplicate ABI entry removal: Removes duplicate getTotalClaims() function signature from multichain.js

Reviewed Changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/utils/wordhandles.js Removed redundant ternary operator applying ethers.getBytes() in both branches
src/stores/multichain.js Removed duplicate ABI entry for getTotalClaims() function
src/components/Explorer.svelte Added import for getNetworkByChainId(), defined networkLabel variable, and added network property to fallbackClaim
yarn.lock Updated dependency lock file with platform-specific binary changes (darwin-x64 → linux-x64)
package-lock.json Added "peer": true annotations to many dependency entries

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

@Steake Steake merged commit 993c793 into hotfixes-refixes Nov 19, 2025
6 checks passed
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