Skip to content

Commit 94550db

Browse files
committed
feat: code refactored for whotelabel changes.
Signed-off-by: Gaurav Goel <[email protected]>
1 parent 3437abb commit 94550db

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Assets/Plugins/Web3AuthSDK/Api/Models/ProjectConfigResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class WhitelistResponse
88

99
public class ProjectConfigResponse
1010
{
11-
public WhiteLabelData whiteLabel { get; set; }
11+
public WhiteLabelData whitelabel { get; set; }
1212
public bool sms_otp_enabled { get; set; }
1313
public bool wallet_connect_enabled { get; set; }
1414
public string wallet_connect_project_id { get; set; }

Assets/Plugins/Web3AuthSDK/Web3Auth.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,11 +658,18 @@ private void fetchProjectConfig()
658658
if (response != null)
659659
{
660660
this.web3AuthOptions.originData = this.web3AuthOptions.originData.mergeMaps(response.whitelist?.signed_urls);
661-
if (response?.whiteLabel != null)
661+
if (response?.whitelabel != null)
662662
{
663-
this.web3AuthOptions.whiteLabel = this.web3AuthOptions.whiteLabel?.merge(response.whiteLabel);
663+
if (this.web3AuthOptions.whiteLabel == null)
664+
{
665+
this.web3AuthOptions.whiteLabel = response.whitelabel;
666+
}
667+
else
668+
{
669+
this.web3AuthOptions.whiteLabel = this.web3AuthOptions.whiteLabel?.merge(response.whitelabel);
670+
}
664671
}
665-
//Debug.Log("this.web3AuthOptions: =>" + JsonConvert.SerializeObject(this.web3AuthOptions));
672+
Debug.Log("this.web3AuthOptions: =>" + JsonConvert.SerializeObject(this.web3AuthOptions));
666673

667674
JsonSerializerSettings settings = new JsonSerializerSettings
668675
{

0 commit comments

Comments
 (0)