Skip to content

Commit 5e7fa98

Browse files
committed
.NET 2.4.0 Upgrade
1 parent 969ff2c commit 5e7fa98

File tree

4 files changed

+41
-20
lines changed

4 files changed

+41
-20
lines changed
15.5 KB
Binary file not shown.

Assets/Thirdweb/Runtime/Unity/ThirdwebManager.cs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -471,22 +471,7 @@ public async Task<SmartWallet> UpgradeToSmartWallet(IThirdwebWallet personalWall
471471
return wallet;
472472
}
473473

474-
public async Task<List<LinkedAccount>> LinkAccount(InAppWallet mainWallet, InAppWallet walletToLink, string otp = null, BigInteger? chainId = null, string jwtOrPayload = null)
475-
{
476-
return await mainWallet.LinkAccount(
477-
walletToLink: walletToLink,
478-
otp: otp,
479-
isMobile: Application.isMobilePlatform,
480-
browserOpenAction: (url) => Application.OpenURL(url),
481-
mobileRedirectScheme: BundleId + "://",
482-
browser: new CrossPlatformUnityBrowser(RedirectPageHtmlOverride),
483-
chainId: chainId,
484-
jwt: jwtOrPayload,
485-
payload: jwtOrPayload
486-
);
487-
}
488-
489-
public async Task<List<LinkedAccount>> LinkAccount(EcosystemWallet mainWallet, EcosystemWallet walletToLink, string otp = null, BigInteger? chainId = null, string jwtOrPayload = null)
474+
public async Task<List<LinkedAccount>> LinkAccount(IThirdwebWallet mainWallet, IThirdwebWallet walletToLink, string otp = null, BigInteger? chainId = null, string jwtOrPayload = null)
490475
{
491476
return await mainWallet.LinkAccount(
492477
walletToLink: walletToLink,

Assets/Thirdweb/Runtime/Unity/Wallets/Core/MetaMaskWallet.cs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
using System.Net.Http;
54
using System.Numerics;
65
using System.Text;
76
using System.Threading.Tasks;
@@ -195,6 +194,26 @@ public Task Disconnect()
195194
return Task.CompletedTask;
196195
}
197196

197+
public Task<List<LinkedAccount>> LinkAccount(
198+
IThirdwebWallet walletToLink,
199+
string otp = null,
200+
bool? isMobile = null,
201+
Action<string> browserOpenAction = null,
202+
string mobileRedirectScheme = "thirdweb://",
203+
IThirdwebBrowser browser = null,
204+
BigInteger? chainId = null,
205+
string jwt = null,
206+
string payload = null
207+
)
208+
{
209+
throw new InvalidOperationException("LinkAccount is not supported by external wallets.");
210+
}
211+
212+
public Task<List<LinkedAccount>> GetLinkedAccounts()
213+
{
214+
throw new InvalidOperationException("GetLinkedAccounts is not supported by external wallets.");
215+
}
216+
198217
#endregion
199218

200219
#region Network Switching

Assets/Thirdweb/Runtime/Unity/Wallets/Core/WalletConnectWallet.cs

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Net.Http;
43
using System.Numerics;
54
using System.Text;
65
using System.Threading.Tasks;
76
using Nethereum.ABI.EIP712;
8-
using Newtonsoft.Json;
97
using WalletConnectSharp.Sign.Models;
108
using WalletConnectSharp.Sign.Models.Engine;
119
using WalletConnectUnity.Core;
@@ -15,7 +13,6 @@
1513
using Nethereum.RPC.Eth.DTOs;
1614
using WalletConnectUnity.Core.Evm;
1715
using Nethereum.Hex.HexTypes;
18-
using UnityEngine;
1916

2017
namespace Thirdweb.Unity
2118
{
@@ -289,5 +286,25 @@ private void SessionRequestDeeplink()
289286
WalletConnect.Instance.Linker.OpenSessionRequestDeepLinkAfterMessageFromSession(activeSessionTopic);
290287
#endif
291288
}
289+
290+
public Task<List<LinkedAccount>> LinkAccount(
291+
IThirdwebWallet walletToLink,
292+
string otp = null,
293+
bool? isMobile = null,
294+
Action<string> browserOpenAction = null,
295+
string mobileRedirectScheme = "thirdweb://",
296+
IThirdwebBrowser browser = null,
297+
BigInteger? chainId = null,
298+
string jwt = null,
299+
string payload = null
300+
)
301+
{
302+
throw new InvalidOperationException("LinkAccount is not supported by external wallets.");
303+
}
304+
305+
public Task<List<LinkedAccount>> GetLinkedAccounts()
306+
{
307+
throw new InvalidOperationException("GetLinkedAccounts is not supported by external wallets.");
308+
}
292309
}
293310
}

0 commit comments

Comments
 (0)