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

chore: filter out polkadot from chain selector #6748

Merged
merged 5 commits into from
Aug 17, 2023
Merged

Conversation

preschian
Copy link
Member

@preschian preschian commented Aug 17, 2023

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.

👇 __ Let's make a quick check before the contribution.

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

Did your issue had any of the "$" label on it?

image

@kodabot
Copy link
Collaborator

kodabot commented Aug 17, 2023

WARNING @preschian PR for issue #6494 which isn't assigned to you. Please be warned that this PR may get rejected if there's another assignee for issue #6494

@netlify
Copy link

netlify bot commented Aug 17, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit fbb4207
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/64de2106005b0600084a92ca
😎 Deploy Preview https://deploy-preview-6748--koda-canary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@reviewpad
Copy link
Contributor

reviewpad bot commented Aug 17, 2023

AI-Generated Summary: This pull request includes three separate patches.

The first patch modifies the utils/chain.ts file to add 'dot' to the disableChainListOnBetaEnv array and to filter out the chains specified in disableChains from the availablePrefixes function.

The second patch refactors the Money.vue file to import functions from @/utils/format/balance in a single import statement, and along with this, the variable unitSymbol now has a default value and two of the properties value and unitSymbol are marked as optional in the props definition.

The third patch carries out a refactor of the Navbar.vue file, useChainRedirect.ts and permision.config.ts by removing the hasExplorer variable and its usage which was determining the visibility of "Explore" functionality, and now this feature directly appears without checking for this condition. Any references to the hasExplorer variable have been removed and consequently, the "Explore" functionality will be constantly available.

@reviewpad reviewpad bot added the small Pull request is small label Aug 17, 2023
@codeclimate
Copy link

codeclimate bot commented Aug 17, 2023

Code Climate has analyzed commit 1684c48 and detected 0 issues on this pull request.

View more on Code Climate.

@preschian preschian changed the title chore: filter out polkadot chore: filter out polkadot from chain selector Aug 17, 2023
@vikiival
Copy link
Member

Isn't is simplier to make PartialConfig<boolean>

which would state if its visible for user

therefore

function isVisible(prefix: Prefix): boolean {
  return visible[prefix] ?? true
}
type PartialConfig<T> = Record<Partial<Prefix>, T>

const visible: PartialConfig<boolean> = {
  dot: false
}

@preschian preschian marked this pull request as ready for review August 17, 2023 09:48
@preschian preschian requested a review from a team as a code owner August 17, 2023 09:48
@preschian preschian requested review from vikiival and daiagi and removed request for a team August 17, 2023 09:48
@vikiival
Copy link
Member

cc @preschian check the comment above

@preschian
Copy link
Member Author

which would state if its visible for user

In which line do we put this? and how we differentiate based on env. currently, we have two visible categories

  • ['dot'] -> all env
  • ['dot', 'movr', 'glmr', 'snek'] -> beta and production

@yangwao
Copy link
Member

yangwao commented Aug 17, 2023

@JustLuuuu will be now happy

@vikiival
Copy link
Member

Let's proceed with this quickie

@vikiival vikiival merged commit a4bb4ba into main Aug 17, 2023
5 of 7 checks passed
@vikiival vikiival deleted the chore/hide-polkadot branch August 17, 2023 13:30
@sonarcloud
Copy link

sonarcloud bot commented Aug 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@stephenjason89
Copy link
Contributor

Hello guys! Just noticed that explorerVisible got removed here but there are still some files referencing it.
Please advice what to do with #6769
So I can procede with a PR

Thank you so much @vikiival @yangwao @preschian

@preschian
Copy link
Member Author

hi @stephenjason89, let's revert it back on permission.config

@stephenjason89
Copy link
Contributor

@preschian noted on this. Will do a PR now

@stephenjason89 stephenjason89 mentioned this pull request Aug 18, 2023
16 tasks
This was referenced Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small Pull request is small waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Polkadot and Kusama NFTs are the same
5 participants