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

Wallet logos not showing up? #4

Open
ChrisK1994 opened this issue Jan 12, 2022 · 19 comments
Open

Wallet logos not showing up? #4

ChrisK1994 opened this issue Jan 12, 2022 · 19 comments

Comments

@ChrisK1994
Copy link

Got this error, I think we should be able fo configure logos.

Not allowed to load local resource: file:///C:/Users/user/Desktop/project/client/node_modules/@mindsorg/web3modal-ts/dist/providers/logos/metamask.svg

@ChrisK1994
Copy link
Author

Could you change logo: URL(...)

@Yetispapa
Copy link

Got the same error. Any update on this?

@Nach0Git
Copy link

Nach0Git commented Feb 5, 2022

@Yetispapa @ChrisK1994
The issue is on the library web3modal-ts. They fixed the issue in this commit and then updated the version to 1.3. This repository is using v1.2.2. projects/webmodal/package.json
I just created a pull request updating the version to 1.3 and plus updating the angular version to 13, I hope they review it soon.

@ottman
Copy link
Member

ottman commented Feb 5, 2022 via email

@Yetispapa
Copy link

Great! Looking forward for the solution 👍

@Nach0Git
Copy link

Nach0Git commented Feb 6, 2022

@Yetispapa @ChrisK1994
I found this to be a problem only for angular 13. With the following package (using latest angular 12) everything seems to work nicely

    "@angular/animations": "~12.2.0",
    "@angular/common": "~12.2.0",
    "@angular/compiler": "~12.2.0",
    "@angular/core": "~12.2.0",
    "@angular/forms": "~12.2.0",
    "@angular/platform-browser": "~12.2.0",
    "@angular/platform-browser-dynamic": "~12.2.0",
    "@angular/router": "~12.2.0",
    "@mindsorg/web3modal-angular": "^1.6.1",
    "@walletconnect/web3-provider": "^1.7.1",

I think for angular 13 the web3modal-ts dependency should be bumped to v1.3 to fix the issue.

@bhayward93
Copy link

Hey, is this fix applied to the branch you are currently using?

https://gitlab.com/minds/web3modal-angular/-/merge_requests/6/diffs

@bhayward93
Copy link

It may be a separate issue, as the linked one above is with a Metamask logo outside of the base web3-modal package.

@Nach0Git
Copy link

Nach0Git commented Feb 7, 2022

@bhayward93 Is a different issue. This affects to every provider icon when using angular 13.
In web3modal-ts v1.3 there's a change to load the icons through URL(...).
I think bumping the version to 1.3 would fix this. Here's the pr

@bhayward93
Copy link

I see, thanks for this - we're currently in the progress of upgrading to Angular 13 ourselves so will be able to test the PR fully as we upgrade - quite likely by the sounds of it we would have ran into the same issue.

Would you be able to give the CLA here a read and signature? https://developers.minds.com/docs/contributing/contributing/

@Yetispapa
Copy link

Hi @bhayward93,

great! Looking forward to the update

@bhayward93
Copy link

@Nach0Git did you test this PR via npm link? I'm still seeing the same behavior now I've upgraded our main stack to Angular 13 locally. I'm tempted to try upgrading the whole package to Angular 13 while I'm in here.

@bhayward93
Copy link

Also note the package-lock's haven't been pushed but can add that in as a commit myself

@Nach0Git
Copy link

Nach0Git commented Feb 14, 2022

@bhayward93 I might have had the local env in a wrong state when I tested this the first time (I was trying a couple approaches to upgrade the packaging to angular 13). I just started over on a fresh branch and I do see the same error on the icons. If I have some time during the week I'll review this again, for my personal project I opted for using the library with angular 12.

@bhayward93
Copy link

I think the issue may be this angular/angular-cli#22351 - would need to test but it fits the issue quite well. Just considering what the best path forward is currently.

@Nach0Git
Copy link

@bhayward93 Thanks for the heads up!
Browsing on the libraries issues it seems like they have fixed it in Webpack webpack/webpack#14809
And there's an open feature request to fix this in the angular side angular/angular-cli#22510

@bhayward93
Copy link

Thanks for sharing - as It's potentially another 30 days away from being considered though, we may have to look for another solution rather than hold up our own core-sites Angular 13 upgrade. I'm currently playing with thing to see if I can make it work - one option also being considered is merging the web3modal-angular and web3modal-ts packages, which could potentially simplify the problem space.

@bhayward93
Copy link

A candidate for release is up here https://gitlab.com/minds/web3modal-angular/-/merge_requests/8/diffs

We opted to merge the two projects and replace the logo URLs with static URLs served from our CDN - we also added an option so you can override if you like to use your own CDN to retain control over the assets/change logos as you wish.

@bhayward93
Copy link

We're pushing another upgrade, to move the Angular version to Angular 13 because compilation fails in our app when using 1.7.0 direct from npm, which was not apparent during development and testing.

I have created a mirror card here for our own internal tracking https://gitlab.com/minds/web3modal-angular/-/issues/7

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

No branches or pull requests

5 participants