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: Wrong validation of polkadot address at transfer? #7408

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

hassnian
Copy link
Contributor

@hassnian hassnian commented Sep 29, 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

Test: address 3p9ErbP5rmDnzu7PU7YFzJ6ih1J3DNE248rEJdkYLFShP6FY

https://polkadot.subscan.io/tools/format_transform?input=3p9ErbP5rmDnzu7PU7YFzJ6ih1J3DNE248rEJdkYLFShP6FY&type=All

it's a Subsocial address

CleanShot 2023-09-29 at 07 54 14@2x

valid polkadot ecosystem address but not one that we support atm

now you can transform from any valid polakdot ecosystem address to the current network

using this pr from Subsocial to Kusama returns -> Dg68oJbsCUtwNbKvGfeAsBftPaPnbrV9gSpJs2iJ1z24iJz

CleanShot 2023-09-29 at 08 04 01@2x

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

  • Fill up your DOT address: Payout

Community participation

Screenshot 📸

CleanShot 2023-09-29 at 07 58 43

Copilot Summary

🤖 Generated by Copilot at da86358

The code adds a feature to check the validity of Polkadot addresses and display an error message in the user's language if the address is from an unsupported network. The code modifies AddressChecker.vue and locales/en.json files.

🤖 Generated by Copilot at da86358

Sing, O Muse, of the cunning coder who devised
A way to check the Polkadot addresses and prevent
The grievous error of sending funds to the wrong network
By adding transfers.invalidAddress.wrongNetwork to the locales/en.json file.

@hassnian hassnian requested a review from a team as a code owner September 29, 2023 03:02
@hassnian hassnian requested review from roiLeo and Jarsen136 and removed request for a team September 29, 2023 03:02
@netlify
Copy link

netlify bot commented Sep 29, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit 8b8aa6d
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/65167f3b1d4b5e00081a9ac4
😎 Deploy Preview https://deploy-preview-7408--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.

@kodabot
Copy link
Collaborator

kodabot commented Sep 29, 2023

SUCCESS @hassnian PR for issue #7405 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 Sep 29, 2023

AI-Generated Summary: This pull request implements changes to the AddressChecker.vue and en.json files. It includes an update to the address validation function, which now allows for the modification of valid Polkadot addresses. This improvement is achieved through the introduction of isValidUnsupportedPolkadotAddress(), a function that processes the validity of unsupported Polkadot addresses, and returns a message when such an address is found. It also introduces 'wrong network' message in the en.json locale file. In total, 21 insertions were made.

@reviewpad reviewpad bot added small Pull request is small waiting-for-review labels Sep 29, 2023
Copy link
Contributor

@Jarsen136 Jarsen136 left a comment

Choose a reason for hiding this comment

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

Could you pls put the function into some utils file?
otherwise lgtm

components/shared/AddressChecker.vue Outdated Show resolved Hide resolved
@codeclimate
Copy link

codeclimate bot commented Sep 29, 2023

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

View more on Code Climate.

@sonarcloud
Copy link

sonarcloud bot commented Sep 29, 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

@yangwao
Copy link
Member

yangwao commented Sep 29, 2023

pay 30 usd

@yangwao yangwao merged commit 89dc314 into kodadot:main Sep 29, 2023
13 of 14 checks passed
@yangwao
Copy link
Member

yangwao commented Sep 29, 2023

😍 Perfect, I’ve sent the payout
💵 $30 @ 4.08 USD/DOT ~ 7.353 $DOT
🧗 13QUj3pZyFNfYj4AM336hRdyLQbevj5H3sR4PKmLEXLdwZhh
🔗 0x463b4b32b5f87072e5d005dbcd02329edffa253f0da93e39c1e8592e7887ae3e

🪅 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 Sep 29, 2023
This was referenced Sep 30, 2023
This was referenced Oct 11, 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 small Pull request is small waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong validation of polkadot address at transfer?
4 participants