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: provided a key attribute to force refresh prism component on re-renders (#894) #896

Conversation

quiet-node
Copy link
Member

Description:
Currently on Hashscan, we utilize an external library prismjs to display the solidity smart contract. This prismjs component wraps around the source solidity file as its child component. However, the prismjs component does not update its child components on re-renders. Therefore, this PR pushes in a fix that forces the prism component to refresh by supplying it with a dynamic unique key attribute.

Related issue(s):

Fixes #894

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Copy link

github-actions bot commented Feb 15, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 85.46% 34608 / 40496
🔵 Statements 85.46% 34608 / 40496
🔵 Functions 65.25% 819 / 1255
🔵 Branches 84.37% 3873 / 4590
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/components/values/SourceCodeValue.vue 93.13% 100% 0% 93.13% 76-82
Generated in workflow #710

Copy link
Collaborator

@ericleponner ericleponner left a comment

Choose a reason for hiding this comment

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

Looks good.

@quiet-node quiet-node merged commit 26ff05f into main Feb 15, 2024
5 of 6 checks passed
@quiet-node quiet-node deleted the 894-navigating-by-verified-contract-evm-address-results-in-previous-contracts-source-code branch February 15, 2024 15:54
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

svienot pushed a commit that referenced this pull request Feb 15, 2024
…renders (#894) (#896)

Signed-off-by: Logan Nguyen <[email protected]>
(cherry picked from commit 26ff05f)
@quiet-node quiet-node restored the 894-navigating-by-verified-contract-evm-address-results-in-previous-contracts-source-code branch February 16, 2024 18:13
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.

Navigating By Verified Contract EVM Address Results in Previous Contracts Source Code
2 participants