Skip to content

Commit db64134

Browse files
Merge branch 'master' into Feature/moonbeam
2 parents 06e601b + b55e31f commit db64134

File tree

6 files changed

+32
-3
lines changed

6 files changed

+32
-3
lines changed

Assets/SequenceSDK/Ethereum/Tests/ABIRegexTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ public void TestMatchesFunctionName(string input, bool expected)
3232
[TestCase("functionName(a,)", false)]
3333
[TestCase("functionName() ", false)]
3434
[TestCase("function_-123Name()", true)]
35+
[TestCase("function_-123Name(int[])", true)]
36+
[TestCase("functionName(a[],a)", true)]
37+
[TestCase("functionName(a[5],a)", true)]
38+
[TestCase("functionName(a[][],a)", true)]
3539
public void TestMatchesFunctionABI(string input, bool expected)
3640
{
3741
bool result = ABIRegex.MatchesFunctionABI(input);

Assets/SequenceSDK/WaaS/Tests/WaaSFederatedAuthTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using PlayFab.ClientModels;
66
using Sequence.EmbeddedWallet;
77
using UnityEngine;
8+
using Random = UnityEngine.Random;
89

910
namespace Sequence.EmbeddedWallet.Tests
1011
{
@@ -86,7 +87,7 @@ private void RetryIfAlreadyLinked(string error)
8687
{
8788
if (error.Contains("AccountAlreadyLinked"))
8889
{
89-
_email = "a" + _email;
90+
_email = Random.Range(0, 9999999).ToString() + _email;
9091
var request = new LoginWithEmailAddressRequest
9192
{
9293
Email = _email,

Packages/Sequence-Unity/Sequence/SequenceFrontend/Scripts/UI/LoginPage.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Sequence.EmbeddedWallet;
44
using TMPro;
55
using UnityEngine;
6+
using System.Collections;
67

78
namespace Sequence.Demo
89
{
@@ -160,5 +161,24 @@ private void EnableLoadingScreen(bool enable)
160161
{
161162
_loadingScreen.SetActive(enable);
162163
}
164+
165+
private void OnApplicationFocus(bool hasFocus)
166+
{
167+
#if !UNITY_IOS
168+
if (hasFocus)
169+
{
170+
StartCoroutine(DisableLoadingScreenIfNotLoggingIn());
171+
}
172+
#endif
173+
}
174+
175+
private IEnumerator DisableLoadingScreenIfNotLoggingIn()
176+
{
177+
yield return new WaitForSecondsRealtime(0.1f);
178+
if (!LoginHandler.IsLoggingIn())
179+
{
180+
EnableLoadingScreen(false);
181+
}
182+
}
163183
}
164184
}

Packages/Sequence-Unity/Sequence/SequenceSDK/EmbeddedWallet/SequenceLogin.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ private void CreateWallet(IValidator validator = null, IAuthenticator authentica
108108

109109
public void ResetSessionId()
110110
{
111+
if (_connectedWalletAddress != null) {
112+
return;
113+
}
111114
_sessionWallet = new EOAWallet();
112115
_sessionId = IntentDataOpenSession.CreateSessionId(_sessionWallet.GetAddress());
113116
_intentSender = new IntentSender(new HttpClient(WaaSWithAuthUrl), _sessionWallet, _sessionId, _waasProjectId, _waasVersion);

Packages/Sequence-Unity/Sequence/SequenceSDK/Ethereum/Contract/ABIRegex.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public static class ABIRegex
44
{
55

66
public const string FunctionNameRegex = @"^[A-Z|a-z|_,-|0-9]+$";
7-
public const string FunctionABIRegex = @"^[A-Z|a-z|_,-|0-9]+\(([A-Z|a-z|0-9]+(, *[A-Z|a-z|0-9]+)*)?\)$";
7+
public const string FunctionABIRegex = @"^[A-Z|a-z|_,-|0-9]+\(([A-Za-z0-9\[\]]+(, *[A-Za-z0-9\[\]]+)*)?\)$";
88

99
public static bool MatchesFunctionName(string input)
1010
{

Packages/Sequence-Unity/Sequence/SequenceSDK/Relayer/PermissionedMinterTransactionQueuer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ private void HandleMintTokenFailed(string error)
2727

2828
private void OnDestroy()
2929
{
30-
_minter.OnMintTokenFailed -= HandleMintTokenFailed;
30+
if (_minter != null)
31+
_minter.OnMintTokenFailed -= HandleMintTokenFailed;
3132
}
3233

3334
public void Enqueue(PermissionedMintTransaction transaction, IMinter minter = null)

0 commit comments

Comments
 (0)