File tree Expand file tree Collapse file tree
Packages/com.walletconnect.web3modal/Runtime/Presenters Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,19 +96,20 @@ private void UpdateProfileAvatar()
9696 {
9797 var avatarUrl = Web3Modal . AccountController . ProfileAvatar ;
9898
99- if ( string . IsNullOrEmpty ( avatarUrl ) )
100- {
101- var address = Web3Modal . AccountController . Address ;
102- var texture = UiUtils . GenerateAvatarTexture ( address ) ;
103- View . ProfileAvatarImage . image = texture ;
104- }
105- else
99+ if ( ! string . IsNullOrEmpty ( avatarUrl ) && ( avatarUrl . EndsWith ( ".jpg" ) || avatarUrl . EndsWith ( ".png" ) || avatarUrl . EndsWith ( ".jpeg" ) ) )
106100 {
107101 var remoteSprite = RemoteSpriteFactory . GetRemoteSprite < Image > ( avatarUrl ) ;
108102 _avatar ? . UnsubscribeImage ( View . ProfileAvatarImage ) ;
109103 _avatar = remoteSprite ;
110104 _avatar . SubscribeImage ( View . ProfileAvatarImage ) ;
111105 }
106+ else
107+ {
108+
109+ var address = Web3Modal . AccountController . Address ;
110+ var texture = UiUtils . GenerateAvatarTexture ( address ) ;
111+ View . ProfileAvatarImage . image = texture ;
112+ }
112113 }
113114
114115 protected override void OnVisibleCore ( )
You can’t perform that action at this time.
0 commit comments