Skip to content

Commit 56f4a2e

Browse files
committed
.NET 2.7.0 // IAW -> Enclave + ERC721_MintTo Fix
1 parent e226e30 commit 56f4a2e

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed
-27 KB
Binary file not shown.

Assets/Thirdweb/Runtime/Unity/ThirdwebManager.cs

+13-8
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class InAppWalletOptions
2323
public string PhoneNumber;
2424
public AuthProvider AuthProvider;
2525
public string JwtOrPayload;
26-
public string EncryptionKey;
26+
public string LegacyEncryptionKey;
2727
public string StorageDirectoryPath;
2828
public IThirdwebWallet SiweSigner;
2929

@@ -32,7 +32,7 @@ public InAppWalletOptions(
3232
string phoneNumber = null,
3333
AuthProvider authprovider = AuthProvider.Default,
3434
string jwtOrPayload = null,
35-
string encryptionKey = null,
35+
string legacyEncryptionKey = null,
3636
string storageDirectoryPath = null,
3737
IThirdwebWallet siweSigner = null
3838
)
@@ -41,7 +41,7 @@ public InAppWalletOptions(
4141
PhoneNumber = phoneNumber;
4242
AuthProvider = authprovider;
4343
JwtOrPayload = jwtOrPayload;
44-
EncryptionKey = encryptionKey;
44+
LegacyEncryptionKey = legacyEncryptionKey;
4545
StorageDirectoryPath = storageDirectoryPath ?? Path.Combine(Application.persistentDataPath, "Thirdweb", "InAppWallet");
4646
SiweSigner = siweSigner;
4747
}
@@ -57,6 +57,7 @@ public class EcosystemWalletOptions
5757
public string JwtOrPayload;
5858
public string StorageDirectoryPath;
5959
public IThirdwebWallet SiweSigner;
60+
public string LegacyEncryptionKey;
6061

6162
public EcosystemWalletOptions(
6263
string ecosystemId = null,
@@ -66,7 +67,8 @@ public EcosystemWalletOptions(
6667
AuthProvider authprovider = AuthProvider.Default,
6768
string jwtOrPayload = null,
6869
string storageDirectoryPath = null,
69-
IThirdwebWallet siweSigner = null
70+
IThirdwebWallet siweSigner = null,
71+
string legacyEncryptionKey = null
7072
)
7173
{
7274
EcosystemId = ecosystemId;
@@ -77,6 +79,7 @@ public EcosystemWalletOptions(
7779
JwtOrPayload = jwtOrPayload;
7880
StorageDirectoryPath = storageDirectoryPath ?? Path.Combine(Application.persistentDataPath, "Thirdweb", "EcosystemWallet");
7981
SiweSigner = siweSigner;
82+
LegacyEncryptionKey = legacyEncryptionKey;
8083
}
8184
}
8285

@@ -299,7 +302,8 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
299302
phoneNumber: walletOptions.InAppWalletOptions.PhoneNumber,
300303
authProvider: walletOptions.InAppWalletOptions.AuthProvider,
301304
storageDirectoryPath: walletOptions.InAppWalletOptions.StorageDirectoryPath,
302-
siweSigner: walletOptions.InAppWalletOptions.SiweSigner
305+
siweSigner: walletOptions.InAppWalletOptions.SiweSigner,
306+
legacyEncryptionKey: walletOptions.InAppWalletOptions.LegacyEncryptionKey
303307
);
304308
break;
305309
case WalletProvider.EcosystemWallet:
@@ -319,7 +323,8 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
319323
phoneNumber: walletOptions.EcosystemWalletOptions.PhoneNumber,
320324
authProvider: walletOptions.EcosystemWalletOptions.AuthProvider,
321325
storageDirectoryPath: walletOptions.EcosystemWalletOptions.StorageDirectoryPath,
322-
siweSigner: walletOptions.EcosystemWalletOptions.SiweSigner
326+
siweSigner: walletOptions.EcosystemWalletOptions.SiweSigner,
327+
legacyEncryptionKey: walletOptions.EcosystemWalletOptions.LegacyEncryptionKey
323328
);
324329
break;
325330
case WalletProvider.WalletConnectWallet:
@@ -348,11 +353,11 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
348353
}
349354
else if (walletOptions.InAppWalletOptions.AuthProvider == AuthProvider.JWT)
350355
{
351-
_ = await inAppWallet.LoginWithJWT(walletOptions.InAppWalletOptions.JwtOrPayload, walletOptions.InAppWalletOptions.EncryptionKey);
356+
_ = await inAppWallet.LoginWithJWT(walletOptions.InAppWalletOptions.JwtOrPayload);
352357
}
353358
else if (walletOptions.InAppWalletOptions.AuthProvider == AuthProvider.AuthEndpoint)
354359
{
355-
_ = await inAppWallet.LoginWithAuthEndpoint(walletOptions.InAppWalletOptions.JwtOrPayload, walletOptions.InAppWalletOptions.EncryptionKey);
360+
_ = await inAppWallet.LoginWithAuthEndpoint(walletOptions.InAppWalletOptions.JwtOrPayload);
356361
}
357362
else if (walletOptions.InAppWalletOptions.AuthProvider == AuthProvider.Guest)
358363
{

Assets/Thirdweb/Runtime/Unity/Wallets/UI/InAppWalletModal.cs

+1-6
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,12 @@ public static Task<InAppWallet> LoginWithOtp(InAppWallet wallet)
4949

5050
modal.OTPInputField.interactable = false;
5151
modal.SubmitButton.interactable = false;
52-
(var address, var canRetry) = await wallet.LoginWithOtp(otp);
52+
var address = await wallet.LoginWithOtp(otp);
5353
if (address != null)
5454
{
5555
modal.InAppWalletCanvas.gameObject.SetActive(false);
5656
tcs.SetResult(wallet);
5757
}
58-
else if (!canRetry)
59-
{
60-
modal.InAppWalletCanvas.gameObject.SetActive(false);
61-
tcs.SetException(new UnityException("Failed to verify OTP."));
62-
}
6358
else
6459
{
6560
modal.OTPInputField.text = string.Empty;

0 commit comments

Comments
 (0)