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: You can change the network field to any string you want #6569

Merged
merged 2 commits into from
Aug 6, 2023

Conversation

Jarsen136
Copy link
Contributor

@Jarsen136 Jarsen136 commented Aug 6, 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

Needs QA check

  • @kodadot/qa-guild please review

Context

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

Screenshot 📸

  • My fix has changed UI

Copilot Summary

🤖 Generated by Copilot at cbd5ffb

Improved prefix selection logic in usePrefix.ts by validating the route parameter and using it as the first option.

🤖 Generated by Copilot at cbd5ffb

validPrefixFromRoute
checks the list, avoids errors
autumn of bugs ends

@Jarsen136 Jarsen136 requested a review from a team as a code owner August 6, 2023 04:01
@Jarsen136 Jarsen136 requested review from preschian and vikiival and removed request for a team August 6, 2023 04:01
@kodabot
Copy link
Collaborator

kodabot commented Aug 6, 2023

SUCCESS @Jarsen136 PR for issue #6563 which is assigned to you. Please wait for review and don't hesitate to grab another issue in the meantime!

@reviewpad
Copy link
Contributor

reviewpad bot commented Aug 6, 2023

AI-Generated Summary: This pull request introduces changes to the function within composables/usePrefix.ts. In particular, the patch adds a new constant validPrefixFromRoute that checks whether the prefix from the route parameters is available in the prefixes list. This new constant is then used in the definition of the prefix computed property, replacing the previous reference to route.params.prefix. This modification ensures that the network field can take on any string value from the whitelist.

@reviewpad reviewpad bot added small Pull request is small waiting-for-review labels Aug 6, 2023
@netlify
Copy link

netlify bot commented Aug 6, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit c400cc3
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/64cfa3343e25be00090d71ad
😎 Deploy Preview https://deploy-preview-6569--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.

@vikiival
Copy link
Member

vikiival commented Aug 6, 2023

With this fix you can just check if initial is not undefined

@Jarsen136
Copy link
Contributor Author

With this fix you can just check if initial is not undefined

Sorry, I'm not sure what do you mean. This fix is not about checking if it's undefined, but checking if the prefix params on route is valid.

before:

Visit: https://canary.kodadot.xyz/hello
image

after fix:
Visit: https://deploy-preview-6569--koda-canary.netlify.app/hello
image

@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Aug 6, 2023
@vikiival
Copy link
Member

vikiival commented Aug 6, 2023

What I wanted to say is that these two lines are very similar.

I wanted to ask if its possible to somehow optimize it.

image

Otherwise lgtm

@Jarsen136
Copy link
Contributor Author

What I wanted to say is that these two lines are very similar.

I wanted to ask if its possible to somehow optimize it.

Yes, I have updated it.

@codeclimate
Copy link

codeclimate bot commented Aug 6, 2023

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

View more on Code Climate.

@sonarcloud
Copy link

sonarcloud bot commented Aug 6, 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
2.3% 2.3% Duplication

@yangwao
Copy link
Member

yangwao commented Aug 6, 2023

pay 50 usd

@yangwao yangwao merged commit aa12e7b into kodadot:main Aug 6, 2023
19 of 20 checks passed
@yangwao
Copy link
Member

yangwao commented Aug 6, 2023

😍 Perfect, I’ve sent the payout
💵 $50 @ 4.99 USD/DOT ~ 10.02 $DOT
🧗 16SjUbGKSdjCdWTy3NNT3JxbRVGGqD4mwkHpc6BD9U2Rp29Z
🔗 0x7d8e3081f9f32cb828ab0d0f3b71a0fca5a2906ad42f6451658978cdf696afd4

🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

@yangwao yangwao added the paid pull-request has been paid label Aug 6, 2023
This was referenced Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paid pull-request has been paid S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked small Pull request is small waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

You can change the network field to any string you want
5 participants