Skip to content

Commit b92c7b2

Browse files
authored
Merge pull request #6675 from decentraland/release/2026-01-12
release: 2026-01-12
2 parents 80acf3d + 7249421 commit b92c7b2

653 files changed

Lines changed: 22290 additions & 8335 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: '[QA] Section | Title'
5-
labels: 'bug, new, need QA validation'
4+
title: '[QA] (Enter Section) | (Enter Title)'
5+
labels: 'bug, new, need QA validation, qa-team'
66
assignees: ''
77

88

Explorer/Assets/AddressableAssetsData/AddressableAssetSettings.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ MonoBehaviour:
1515
m_DefaultGroup: 47f803e1e9c5079449bd106df98a0b7d
1616
m_currentHash:
1717
serializedVersion: 2
18-
Hash: 61fd69a6987cc3e7c8154fed97a91062
18+
Hash: 37b170adf0ea7bf77c14f9b4fb468f18
1919
m_OptimizeCatalogSize: 0
2020
m_BuildRemoteCatalog: 0
2121
m_CatalogRequestsTimeout: 0

Explorer/Assets/AddressableAssetsData/AssetGroups/UI.asset

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,11 @@ MonoBehaviour:
595595
m_ReadOnly: 0
596596
m_SerializedLabels: []
597597
FlaggedDuringContentUpdateRestriction: 0
598+
- m_GUID: a9b1068498c63904cb1ff1958d25fb63
599+
m_Address: Assets/DCL/UI/DuplicateIdentityPopup/DuplicateIdentityWindow.prefab
600+
m_ReadOnly: 0
601+
m_SerializedLabels: []
602+
FlaggedDuringContentUpdateRestriction: 0
598603
- m_GUID: aabac5666448b4345a76347f94ea32a4
599604
m_Address: BackpackItem
600605
m_ReadOnly: 0

Explorer/Assets/DCL/AuthenticationScreenFlow/Assets/Prefabs/AuthenticationScreen.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2983,7 +2983,7 @@ MonoBehaviour:
29832983
<LoginButton>k__BackingField: {fileID: 4708745492529117082}
29842984
<CancelLoginButton>k__BackingField: {fileID: 7148045455480499345}
29852985
<LoadingSpinner>k__BackingField: {fileID: 101159986873043013}
2986-
<PendingAuthentication>k__BackingField: {fileID: 9139651224223642632}
2986+
<VerificationContainer>k__BackingField: {fileID: 9139651224223642632}
29872987
<CancelAuthenticationProcess>k__BackingField: {fileID: 7578292249645083079}
29882988
<FinalizeContainer>k__BackingField: {fileID: 3916047686447302749}
29892989
<JumpIntoWorldButton>k__BackingField: {fileID: 8577423537029511}

Explorer/Assets/DCL/AuthenticationScreenFlow/Assets/Textures/Authentication.spriteatlasv2.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationFlowStateMachine.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using MVC;
2+
3+
namespace DCL.AuthenticationScreenFlow.AuthenticationFlowStateMachine
4+
{
5+
public abstract class AuthStateBase : IExitableState
6+
{
7+
protected readonly AuthenticationScreenView viewInstance;
8+
9+
protected AuthStateBase(AuthenticationScreenView viewInstance)
10+
{
11+
this.viewInstance = viewInstance;
12+
}
13+
14+
public virtual void Exit() {}
15+
}
16+
}

Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationFlowStateMachine/AuthStateBase.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
using Cysharp.Threading.Tasks;
2+
using DCL.Diagnostics;
3+
using DCL.PerformanceAndDiagnostics;
4+
using DCL.Settings.Utils;
5+
using DCL.UI;
6+
using DCL.Utilities;
7+
using DCL.Web3.Authenticators;
8+
using DCL.Web3.Identities;
9+
using Global.AppArgs;
10+
using MVC;
11+
using System;
12+
using System.Collections.Generic;
13+
using System.Threading;
14+
using UnityEngine;
15+
using Utility;
16+
using static DCL.AuthenticationScreenFlow.AuthenticationScreenController;
17+
18+
namespace DCL.AuthenticationScreenFlow.AuthenticationFlowStateMachine
19+
{
20+
public class IdentityAndVerificationAuthState : AuthStateBase, IPayloadedState<CancellationToken>
21+
{
22+
private readonly MVCStateMachine<AuthStateBase> machine;
23+
private readonly AuthenticationScreenController controller;
24+
private readonly ReactiveProperty<AuthenticationStatus> currentState;
25+
private readonly IWeb3VerifiedAuthenticator web3Authenticator;
26+
private readonly IAppArgs appArgs;
27+
private readonly List<Resolution> possibleResolutions;
28+
private readonly SentryTransactionManager sentryTransactionManager;
29+
private CancellationTokenSource? verificationCountdownCancellationToken;
30+
31+
public IdentityAndVerificationAuthState(
32+
MVCStateMachine<AuthStateBase> machine,
33+
AuthenticationScreenView viewInstance,
34+
AuthenticationScreenController controller,
35+
ReactiveProperty<AuthenticationStatus> currentState,
36+
IWeb3VerifiedAuthenticator web3Authenticator,
37+
IAppArgs appArgs,
38+
List<Resolution> possibleResolutions,
39+
SentryTransactionManager sentryTransactionManager) : base(viewInstance)
40+
{
41+
this.machine = machine;
42+
this.controller = controller;
43+
this.currentState = currentState;
44+
this.web3Authenticator = web3Authenticator;
45+
this.appArgs = appArgs;
46+
this.possibleResolutions = possibleResolutions;
47+
this.sentryTransactionManager = sentryTransactionManager;
48+
}
49+
50+
public void Enter(CancellationToken ct)
51+
{
52+
// Checks the current screen mode because it could have been overridden with Alt+Enter
53+
if (Screen.fullScreenMode != FullScreenMode.Windowed)
54+
WindowModeUtils.ApplyWindowedMode();
55+
56+
AuthenticateAsync(ct).Forget();
57+
}
58+
59+
public override void Exit()
60+
{
61+
RestoreResolutionAndScreenMode();
62+
63+
CancelVerificationCountdown();
64+
65+
viewInstance.VerificationCodeHintContainer.SetActive(false);
66+
viewInstance.VerificationContainer.SetActive(false);
67+
68+
viewInstance.LoginContainer.SetActive(false);
69+
70+
// Listeners
71+
viewInstance.CancelAuthenticationProcess.onClick.RemoveListener(controller.CancelLoginProcess);
72+
viewInstance.VerificationCodeHintButton.onClick.RemoveListener(ToggleVerificationCodeVisibility);
73+
}
74+
75+
private async UniTaskVoid AuthenticateAsync(CancellationToken ct)
76+
{
77+
try
78+
{
79+
controller.CurrentRequestID = string.Empty;
80+
81+
var web3AuthSpan = new SpanData
82+
{
83+
TransactionName = LOADING_TRANSACTION_NAME,
84+
SpanName = "Web3Authentication",
85+
SpanOperation = "auth.web3_login",
86+
Depth = 1,
87+
};
88+
89+
sentryTransactionManager.StartSpan(web3AuthSpan);
90+
91+
web3Authenticator.VerificationRequired += ShowVerification;
92+
IWeb3Identity identity = await web3Authenticator.LoginAsync(ct);
93+
94+
machine.Enter<ProfileFetchingAuthState, (IWeb3Identity identity, bool isCached, CancellationToken ct)>((identity, false, ct));
95+
}
96+
catch (OperationCanceledException)
97+
{
98+
sentryTransactionManager.EndCurrentSpanWithError(LOADING_TRANSACTION_NAME, "Login process was cancelled by user");
99+
machine.Enter<LoginStartAuthState>();
100+
}
101+
catch (SignatureExpiredException e)
102+
{
103+
sentryTransactionManager.EndCurrentSpanWithError(LOADING_TRANSACTION_NAME, "Web3 signature expired during authentication", e);
104+
ReportHub.LogException(e, new ReportData(ReportCategory.AUTHENTICATION));
105+
machine.Enter<LoginStartAuthState>();
106+
}
107+
catch (Web3SignatureException e)
108+
{
109+
sentryTransactionManager.EndCurrentSpanWithError(LOADING_TRANSACTION_NAME, "Web3 signature validation failed", e);
110+
ReportHub.LogException(e, new ReportData(ReportCategory.AUTHENTICATION));
111+
machine.Enter<LoginStartAuthState>();
112+
}
113+
catch (CodeVerificationException e)
114+
{
115+
sentryTransactionManager.EndCurrentSpanWithError(LOADING_TRANSACTION_NAME, "Code verification failed during authentication", e);
116+
ReportHub.LogException(e, new ReportData(ReportCategory.AUTHENTICATION));
117+
machine.Enter<LoginStartAuthState>();
118+
}
119+
catch (Exception e)
120+
{
121+
sentryTransactionManager.EndCurrentSpanWithError(LOADING_TRANSACTION_NAME, "Unexpected error during authentication flow", e);
122+
ReportHub.LogException(e, new ReportData(ReportCategory.AUTHENTICATION));
123+
machine.Enter<LoginStartAuthState, PopupType>(PopupType.CONNECTION_ERROR);
124+
}
125+
finally
126+
{
127+
web3Authenticator.VerificationRequired -= ShowVerification;
128+
}
129+
}
130+
131+
private void RestoreResolutionAndScreenMode()
132+
{
133+
Resolution targetResolution = WindowModeUtils.GetTargetResolution(possibleResolutions);
134+
FullScreenMode targetScreenMode = WindowModeUtils.GetTargetScreenMode(appArgs.HasFlag(AppArgsFlags.WINDOWED_MODE));
135+
Screen.SetResolution(targetResolution.width, targetResolution.height, targetScreenMode, targetResolution.refreshRateRatio);
136+
}
137+
138+
private void ShowVerification((int code, DateTime expiration, string requestId) data)
139+
{
140+
web3Authenticator.VerificationRequired -= ShowVerification;
141+
currentState.Value = AuthenticationStatus.VerificationInProgress;
142+
143+
viewInstance!.VerificationCodeLabel.text = data.code.ToString();
144+
controller.CurrentRequestID = data.requestId;
145+
146+
var verificationSpan = new SpanData
147+
{
148+
TransactionName = LOADING_TRANSACTION_NAME,
149+
SpanName = "CodeVerification",
150+
SpanOperation = "auth.code_verification",
151+
Depth = 1,
152+
};
153+
154+
sentryTransactionManager.StartSpan(verificationSpan);
155+
156+
CancelVerificationCountdown();
157+
verificationCountdownCancellationToken = new CancellationTokenSource();
158+
159+
viewInstance.StartVerificationCountdownAsync(data.expiration, verificationCountdownCancellationToken.Token)
160+
.Forget();
161+
162+
// Anim-OUT non-interactable Login Screen
163+
viewInstance.LoginAnimator.SetTrigger(UIAnimationHashes.OUT);
164+
165+
viewInstance.LoginButton.gameObject.SetActive(true);
166+
viewInstance.LoginButton.interactable = false;
167+
168+
viewInstance.LoadingSpinner.SetActive(false);
169+
170+
// Anim-IN Verification Screen
171+
viewInstance.VerificationContainer.SetActive(true);
172+
viewInstance.VerificationAnimator.ResetAnimator();
173+
viewInstance.VerificationAnimator.SetTrigger(UIAnimationHashes.IN);
174+
175+
// Listeners
176+
viewInstance.CancelAuthenticationProcess.onClick.AddListener(controller.CancelLoginProcess);
177+
viewInstance.VerificationCodeHintButton.onClick.AddListener(ToggleVerificationCodeVisibility);
178+
}
179+
180+
private void CancelVerificationCountdown()
181+
{
182+
verificationCountdownCancellationToken?.SafeCancelAndDispose();
183+
verificationCountdownCancellationToken = null;
184+
}
185+
186+
private void ToggleVerificationCodeVisibility() =>
187+
viewInstance!.VerificationCodeHintContainer.SetActive(!viewInstance.VerificationCodeHintContainer.activeSelf);
188+
}
189+
}

Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationFlowStateMachine/IdentityAndVerificationAuthState.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)