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

Fixed explorer assign tab contract duplication bug #70

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

gitshreevatsa
Copy link
Collaborator

@gitshreevatsa gitshreevatsa commented Jan 31, 2025

Changed AssignTab explicitly to disallow duplication of contracts and clearing of address on modal close.

  • Changed assign tab to not show addresses persisting from previous interaction. Upon close of modal, you have a clear input tab.
  • This PR also adds logic to not allow duplication of contracts which is, once you have deployed a contract, you cannot use the same address to assign it again when the deployed contract still exists in the sandbox.

import { useStyletron } from "styletron-react";
import { $smartAccount } from "../../../account-connector/model";
import {
$assignedSmartContractAddress,
$state,
Copy link
Member

Choose a reason for hiding this comment

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

can you plz rename this? state is a meaningless name which is quite not good practice. imagine you are going to have another similar entity - how to name it - state2?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have renamed it with deployedContracts because the variable is a store that holds contracts code with array of addresses, post deployment.

@gitshreevatsa gitshreevatsa added this pull request to the merge queue Feb 3, 2025
Merged via the queue into main with commit b8733c1 Feb 3, 2025
12 checks passed
@gitshreevatsa gitshreevatsa deleted the explorerBugs branch February 3, 2025 17:41
@ukorvl ukorvl changed the title Explorer bugs Fixed explorer assign tab contract duplication bug Feb 3, 2025
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.

Duplicates of assigned contracts Clear Assign address value after modal close
2 participants