Skip to content

Commit 951ae8c

Browse files
authored
Connect Wallet Prefab - Metamask button supports any injected wallet
Prefab default uses Injected provider for the Metamask button now
1 parent 5194f68 commit 951ae8c

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

Assets/Thirdweb/Examples/Prefabs/Prefab_ConnectWallet.prefab

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,21 +2284,21 @@ MonoBehaviour:
22842284
m_Script: {fileID: 11500000, guid: 56e0ba15cb38b4345825030a6c81d2dd, type: 3}
22852285
m_Name:
22862286
m_EditorClassIdentifier:
2287-
supportedWallets: 000000000100000002000000
2287+
supportedWallets: 010000000200000003000000
22882288
supportSwitchingNetwork: 1
22892289
connectButton: {fileID: 1335404547334051784}
22902290
connectDropdown: {fileID: 1335404547797609896}
22912291
walletButtons:
2292-
- wallet: 0
2292+
- wallet: 1
22932293
walletButton: {fileID: 1335404546759128316}
22942294
icon: {fileID: 21300000, guid: 217680bfb64fc074392309113986a3ee, type: 3}
2295-
- wallet: 1
2295+
- wallet: 2
22962296
walletButton: {fileID: 1045367075}
22972297
icon: {fileID: 21300000, guid: 3e92fa75bd5ab3047974f1a4f9dc4832, type: 3}
2298-
- wallet: 2
2298+
- wallet: 3
22992299
walletButton: {fileID: 351517269}
23002300
icon: {fileID: 21300000, guid: d5a5e5db03872be4c8c6303a906b29bd, type: 3}
2301-
- wallet: 3
2301+
- wallet: 4
23022302
walletButton: {fileID: 679192013}
23032303
icon: {fileID: 21300000, guid: 59f310e18bee0db49a8061c8ff8b9743, type: 3}
23042304
connectedButton: {fileID: 1620813798}
@@ -2430,7 +2430,7 @@ GameObject:
24302430
- component: {fileID: 1335404546759128315}
24312431
- component: {fileID: 1335404546759128314}
24322432
m_Layer: 5
2433-
m_Name: Button_Metamask
2433+
m_Name: Button_Injected
24342434
m_TagString: Untagged
24352435
m_Icon: {fileID: 0}
24362436
m_NavMeshLayer: 0

Assets/Thirdweb/Examples/Scripts/Prefabs/Prefab_ConnectWallet.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
public enum Wallet
99
{
1010
MetaMask,
11+
Injected,
1112
CoinbaseWallet,
1213
WalletConnect,
1314
MagicAuth,
@@ -31,8 +32,8 @@ public struct NetworkSprite
3132
public class Prefab_ConnectWallet : MonoBehaviour
3233
{
3334
[Header("SETTINGS")]
34-
public List<Wallet> supportedWallets = new List<Wallet> { Wallet.MetaMask, Wallet.CoinbaseWallet, Wallet.WalletConnect };
35-
public bool supportSwitchingNetwork = false;
35+
public List<Wallet> supportedWallets;
36+
public bool supportSwitchingNetwork;
3637

3738
[Header("UI ELEMENTS (DO NOT EDIT)")]
3839
// Connecting
@@ -230,6 +231,8 @@ WalletProvider GetWalletProvider(Wallet _wallet)
230231
{
231232
case Wallet.MetaMask:
232233
return WalletProvider.MetaMask;
234+
case Wallet.Injected:
235+
return WalletProvider.Injected;
233236
case Wallet.CoinbaseWallet:
234237
return WalletProvider.CoinbaseWallet;
235238
case Wallet.WalletConnect:
Loading

0 commit comments

Comments
 (0)