hi, how can I change the icon (red box) and message (blue box) when connect with metamask? I try changed it at wallet connect prefab but it didn’t work so I changed it in Moralis Controller. But the strange thing is the sign request able to show the correct icon, but not the one connect to metamask. Thanks in advance.
How did you make that change that works now?
how it looks when it doesn’t work as expected? (
but not the one connect to metamask)
I set the icon uri (Metamask icon uri) in moralis controller prefab as show in attached image.
That one connect to metamask which doesn’t work is showing website icon instead of the Metamask icon.
You can’t change that (not in that way anyway), the images you’re referring to are the favicons for the site where WalletConnect, etc. is used. You can test with a WalletConnect demo where their logo shows up when connecting.
That ApplicationIcon prefab is I think just for the game (the ethereum-unity-boilerplate uses
https://moralis.io/wp-content/uploads/2021/06/Powered-by-Moralis-Badge-Black.svg by default), it’s not related.
Correct me if I’m wrong. If I want to set the icon for walletconnect, I need to set website favicon and change the application url to my site in Unity only right? Thanks.
Yes, the site favicon is used in MetaMask. It will change depending on where WalletConnect is implemented.
“It will change depending on where WalletConnect is implemented” u mean it will change when build for different platform? By the way, the site url I need to change is in MoralisSetup prefab or in WalletConnect prefab? Cause I saw there are url field I can change in both prefab. Thanks.
I’m not too sure which prefab, you can try it out. I mean in a general sense, MetaMask will pick up the site’s or app’s icon wherever the connection is made (via WalletConnect). Like tinyurl’s or the WalletConnect demo’s.
I see. One more question, does my site need to be https in order to show the icon?
It shouldn’t need to be no.
For the Connect to this site message, I don’t think so.
Thanks glad. Appreciate for the help.
Hi glad, im facing some issue regarding the icon. After I change the uri to my site and set the favicon, it still can’t show my site icon on metamask.
This is how I set my favicon. I tried with png format but still same result.
So the favicon is displaying fine if you open that link/IP in a browser?
Try adding shortcut as outlined here: Defining Your App’s Icon | MetaMask Docs
Possibly it will be fine once your site is deployed.
yes. The favicon display fine when open the link.
I will try again once my site are properly set. Thanks.
hi glad, the favicon display fine in browser, Metamask still can’t show my site favicon, instead it show unknown icon which I don’t know where it get from. I tried different way to set fav icon include add shortcut as outline, set different size, etc., but still can’t resolve. Do you know what I still miss?
shortcut to your link rel tag like in the docs. Defining Your App’s Icon | MetaMask Docs
I’m not sure where that icon has come from. I’m also not able to go to that site directly from the MetaMask browser, probably due it to not being secure (HTTPS), that may also be related.
Thanks glad. We found the issue and think it was related to server. Originally we hosted our website on Aliyun server, but when we try hosting in Moralis Server, the issue is gone and now icon is displaying fine in Metamask. Thanks for the help.