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

495 enable circle eurcs as spacewalk asset on the portal on pendulum #525

Merged

Conversation

ebma
Copy link
Member

@ebma ebma commented Jul 18, 2024

Refactors the logic to get an icon so that it checks using includes and not for perfect matches and adds an additional check to decide between the mEURC and cEURC icons.

With these changes, the Circle EURC icon should show properly in the dashboard as well as the asset selector in the Spacewalk menus. We don't care about Nabla yet as that's a special use case where we don't need to have a perfect solution just yet.

Closes #495.

@ebma ebma linked an issue Jul 18, 2024 that may be closed by this pull request
2 tasks
@ebma ebma requested a review from Sharqiewicz July 18, 2024 15:24
Copy link

netlify bot commented Jul 18, 2024

Deploy Preview for rococo-souffle-a625f5 ready!

Name Link
🔨 Latest commit 5f5f58d
🔍 Latest deploy log https://app.netlify.com/sites/rococo-souffle-a625f5/deploys/66a005995f47280008de2cb9
😎 Deploy Preview https://deploy-preview-525--rococo-souffle-a625f5.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.

@ebma ebma requested review from prayagd and annatekl July 22, 2024 10:19
* improve code readability

* extract mykobo logic into handleSpecialAsset function
Copy link
Collaborator

@Sharqiewicz Sharqiewicz left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 ✅

@ebma
Copy link
Member Author

ebma commented Jul 22, 2024

@Sharqiewicz I noticed that all EURC icons are now showing the Circle EURc though I was not yet able to pin down why. This happens in the dashboard as well as the asset selector of the spacewalk dialogs. Very weird.
image

@Sharqiewicz
Copy link
Collaborator

@Sharqiewicz I noticed that all EURC icons are now showing the Circle EURc though I was not yet able to pin down why. This happens in the dashboard as well as the asset selector of the spacewalk dialogs. Very weird. image

No asset matches the Mykobo issuer address, I am resolving it

@ebma
Copy link
Member Author

ebma commented Jul 23, 2024

I also thought that something was wrong with that match but actually, if you add plenty of log statements you will see that sometimes, it is able to match it. I think the issuer is sometimes not getting passed into the function and that's why it will return the cEURC icon by default.

I was not able to find the places where the issuer is not passed though.

@Sharqiewicz
Copy link
Collaborator

@ebma The issue was that we were invoking getAssetIcon two times, first for getPolkadotAssetIcon and then for getStellarAssetIcon. getPolkadotAssetIcon had always value of cEURC and getStellarAssetIcon had the value of mEURC. The return condition was polkadotIcon || stellarIcon || defaultIcon; so it was always returning cEURC.

@ebma
Copy link
Member Author

ebma commented Jul 24, 2024

Ahh I see, thanks a lot for debugging and fixing this @Sharqiewicz! 🙏 I'll merge it then.

@ebma ebma merged commit 301553b into main Jul 24, 2024
5 checks passed
@ebma ebma deleted the 495-enable-circle-eurcs-as-spacewalk-asset-on-the-portal-on-pendulum branch July 24, 2024 08:26
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.

Enable Circle EURC.s as Spacewalk asset on the portal on Pendulum
2 participants