u
This commit is contained in:
@@ -158,6 +158,14 @@ public partial class AuthDialog : IDisposable
|
||||
try
|
||||
{
|
||||
_verifyRequest.Mobile = _phoneNumber;
|
||||
|
||||
// Check for stored referral code and add it to the request
|
||||
var storedReferralCode = await LocalStorage.GetItemAsync<string>("referral:code");
|
||||
if (!string.IsNullOrWhiteSpace(storedReferralCode))
|
||||
{
|
||||
_verifyRequest.ParentReferralCode = storedReferralCode;
|
||||
}
|
||||
|
||||
var validationResult = _verifyRequestValidator.Validate(_verifyRequest);
|
||||
if (!validationResult.IsValid)
|
||||
{
|
||||
@@ -196,6 +204,9 @@ public partial class AuthDialog : IDisposable
|
||||
await LocalStorage.RemoveItemAsync(PhoneStorageKey);
|
||||
await LocalStorage.RemoveItemAsync(RedirectStorageKey);
|
||||
|
||||
// Clear referral code after successful registration/login
|
||||
await LocalStorage.RemoveItemAsync("referral:code");
|
||||
|
||||
_attemptsLeft = MaxVerificationAttempts;
|
||||
_verifyRequest.Code = string.Empty;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user