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: fix dictionary update in remove_prefix_from_names #1269

Closed
wants to merge 1 commit into from

Conversation

0xwitty
Copy link

@0xwitty 0xwitty commented Dec 20, 2024

Description:

Change resolves an issue in the remove_prefix_from_names function where the update method was used incorrectly. The previous implementation attempted to pass a list to dict.update, which led to a mismatch with the method's expected input.

The fix replaces this with a direct assignment for clarity and correctness:

Before:

contract.update([("name", remove_prefix(contract['name'], 'openzeppelin_presets_'))])

After:

contract['name'] = remove_prefix(contract['name'], 'openzeppelin_presets_')

This makes the code not only functional but also more concise and easier to read.

PR Checklist

  • Tests
  • Documentation
  • Added entry to CHANGELOG.md
  • Tried the feature on a public network

@ericnordelo
Copy link
Member

Duplicate of #1264, which was closed with an explanation, and was created by the same user.

@0xwitty 0xwitty deleted the patch-2 branch December 20, 2024 12:09
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