Skip to content

Commit

Permalink
.NET 2.7.0 // IAW -> Enclave + ERC721_MintTo Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFirekeeper committed Nov 6, 2024
1 parent e226e30 commit 56f4a2e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Binary file modified Assets/Thirdweb/Runtime/NET/Thirdweb.dll
Binary file not shown.
21 changes: 13 additions & 8 deletions Assets/Thirdweb/Runtime/Unity/ThirdwebManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class InAppWalletOptions
public string PhoneNumber;
public AuthProvider AuthProvider;
public string JwtOrPayload;
public string EncryptionKey;
public string LegacyEncryptionKey;
public string StorageDirectoryPath;
public IThirdwebWallet SiweSigner;

Expand All @@ -32,7 +32,7 @@ public InAppWalletOptions(
string phoneNumber = null,
AuthProvider authprovider = AuthProvider.Default,
string jwtOrPayload = null,
string encryptionKey = null,
string legacyEncryptionKey = null,
string storageDirectoryPath = null,
IThirdwebWallet siweSigner = null
)
Expand All @@ -41,7 +41,7 @@ public InAppWalletOptions(
PhoneNumber = phoneNumber;
AuthProvider = authprovider;
JwtOrPayload = jwtOrPayload;
EncryptionKey = encryptionKey;
LegacyEncryptionKey = legacyEncryptionKey;
StorageDirectoryPath = storageDirectoryPath ?? Path.Combine(Application.persistentDataPath, "Thirdweb", "InAppWallet");
SiweSigner = siweSigner;
}
Expand All @@ -57,6 +57,7 @@ public class EcosystemWalletOptions
public string JwtOrPayload;
public string StorageDirectoryPath;
public IThirdwebWallet SiweSigner;
public string LegacyEncryptionKey;

public EcosystemWalletOptions(
string ecosystemId = null,
Expand All @@ -66,7 +67,8 @@ public EcosystemWalletOptions(
AuthProvider authprovider = AuthProvider.Default,
string jwtOrPayload = null,
string storageDirectoryPath = null,
IThirdwebWallet siweSigner = null
IThirdwebWallet siweSigner = null,
string legacyEncryptionKey = null
)
{
EcosystemId = ecosystemId;
Expand All @@ -77,6 +79,7 @@ public EcosystemWalletOptions(
JwtOrPayload = jwtOrPayload;
StorageDirectoryPath = storageDirectoryPath ?? Path.Combine(Application.persistentDataPath, "Thirdweb", "EcosystemWallet");
SiweSigner = siweSigner;
LegacyEncryptionKey = legacyEncryptionKey;
}
}

Expand Down Expand Up @@ -299,7 +302,8 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
phoneNumber: walletOptions.InAppWalletOptions.PhoneNumber,
authProvider: walletOptions.InAppWalletOptions.AuthProvider,
storageDirectoryPath: walletOptions.InAppWalletOptions.StorageDirectoryPath,
siweSigner: walletOptions.InAppWalletOptions.SiweSigner
siweSigner: walletOptions.InAppWalletOptions.SiweSigner,
legacyEncryptionKey: walletOptions.InAppWalletOptions.LegacyEncryptionKey
);
break;
case WalletProvider.EcosystemWallet:
Expand All @@ -319,7 +323,8 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
phoneNumber: walletOptions.EcosystemWalletOptions.PhoneNumber,
authProvider: walletOptions.EcosystemWalletOptions.AuthProvider,
storageDirectoryPath: walletOptions.EcosystemWalletOptions.StorageDirectoryPath,
siweSigner: walletOptions.EcosystemWalletOptions.SiweSigner
siweSigner: walletOptions.EcosystemWalletOptions.SiweSigner,
legacyEncryptionKey: walletOptions.EcosystemWalletOptions.LegacyEncryptionKey
);
break;
case WalletProvider.WalletConnectWallet:
Expand Down Expand Up @@ -348,11 +353,11 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
}
else if (walletOptions.InAppWalletOptions.AuthProvider == AuthProvider.JWT)
{
_ = await inAppWallet.LoginWithJWT(walletOptions.InAppWalletOptions.JwtOrPayload, walletOptions.InAppWalletOptions.EncryptionKey);
_ = await inAppWallet.LoginWithJWT(walletOptions.InAppWalletOptions.JwtOrPayload);
}
else if (walletOptions.InAppWalletOptions.AuthProvider == AuthProvider.AuthEndpoint)
{
_ = await inAppWallet.LoginWithAuthEndpoint(walletOptions.InAppWalletOptions.JwtOrPayload, walletOptions.InAppWalletOptions.EncryptionKey);
_ = await inAppWallet.LoginWithAuthEndpoint(walletOptions.InAppWalletOptions.JwtOrPayload);
}
else if (walletOptions.InAppWalletOptions.AuthProvider == AuthProvider.Guest)
{
Expand Down
7 changes: 1 addition & 6 deletions Assets/Thirdweb/Runtime/Unity/Wallets/UI/InAppWalletModal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,12 @@ public static Task<InAppWallet> LoginWithOtp(InAppWallet wallet)

modal.OTPInputField.interactable = false;
modal.SubmitButton.interactable = false;
(var address, var canRetry) = await wallet.LoginWithOtp(otp);
var address = await wallet.LoginWithOtp(otp);
if (address != null)
{
modal.InAppWalletCanvas.gameObject.SetActive(false);
tcs.SetResult(wallet);
}
else if (!canRetry)
{
modal.InAppWalletCanvas.gameObject.SetActive(false);
tcs.SetException(new UnityException("Failed to verify OTP."));
}
else
{
modal.OTPInputField.text = string.Empty;
Expand Down

0 comments on commit 56f4a2e

Please sign in to comment.