Skip to content

Commit

Permalink
chore: Make login with id token run in prod mainnet environment (#117)
Browse files Browse the repository at this point in the history
Co-authored-by: Park Juhyung(Borre) <jh@majecty.com>
  • Loading branch information
borre-haechi and majecty authored Dec 14, 2023
1 parent 8c9d45d commit d0e8d91
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,11 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 170634539471949390}
- {fileID: 3428151321197611783}
- {fileID: 4360833315097827249}
- {fileID: 1788556491002615578}
- {fileID: 170634539471949390}
- {fileID: 7168173487108222607}
- {fileID: 1788556491002615578}
- {fileID: 2655668803059060323}
m_Father: {fileID: 973352410281316130}
m_RootOrder: 1
Expand Down Expand Up @@ -345,7 +345,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7621451613516012324, guid: 9da7c4f7dea534c01a96075632a845f0, type: 3}
propertyPath: m_RootOrder
value: 4
value: 3
objectReference: {fileID: 0}
- target: {fileID: 7621451613516012324, guid: 9da7c4f7dea534c01a96075632a845f0, type: 3}
propertyPath: m_AnchorMax.x
Expand Down Expand Up @@ -619,7 +619,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7621451613516012324, guid: 9da7c4f7dea534c01a96075632a845f0, type: 3}
propertyPath: m_RootOrder
value: 0
value: 2
objectReference: {fileID: 0}
- target: {fileID: 7621451613516012324, guid: 9da7c4f7dea534c01a96075632a845f0, type: 3}
propertyPath: m_AnchorMax.x
Expand Down Expand Up @@ -784,7 +784,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4621339715770226443, guid: a1270d3d90b9f41b6a9e2b1f50e6ad41, type: 3}
propertyPath: m_RootOrder
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4621339715770226443, guid: a1270d3d90b9f41b6a9e2b1f50e6ad41, type: 3}
propertyPath: m_AnchorMax.x
Expand Down Expand Up @@ -945,7 +945,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7621451613516012324, guid: 9da7c4f7dea534c01a96075632a845f0, type: 3}
propertyPath: m_RootOrder
value: 3
value: 4
objectReference: {fileID: 0}
- target: {fileID: 7621451613516012324, guid: 9da7c4f7dea534c01a96075632a845f0, type: 3}
propertyPath: m_AnchorMax.x
Expand Down Expand Up @@ -1212,7 +1212,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4621339715770226443, guid: a1270d3d90b9f41b6a9e2b1f50e6ad41, type: 3}
propertyPath: m_RootOrder
value: 2
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4621339715770226443, guid: a1270d3d90b9f41b6a9e2b1f50e6ad41, type: 3}
propertyPath: m_AnchorMax.x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ public class AppStateSO : ReadOnlyAppState

private const string SAMPLE_API_KEY =
"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCS23ncDS7x8nmTuK1FFN0EfYo0vo6xhTBMBNWVbQsufv60X8hv3-TbAQ3JIyMEhLo-c-31oYrvrQ0G2e9j8yvJYEUnLuE-PaABo0y3V5m9g_qdTB5p9eEfqZlDrcUl1zUr4W7rJwFwkTlAFSKOqVCPnm8ozmcMyyrEHgl2AbehrQIDAQAB";

private const string PM_SAMPLE_API_KEY =
"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDFhGcETETTZVrysoeadS_HGjY3p_jxFkZMR3aE2Sy-d7kjn_WJLYd5f3voEK9mbmLvglt3SGLw08xh_mVFD3rP8QoCNmjkyCbMIeszpCtudAAq1Ar37ZWCKQArWlhXB9EtTU9e3E4FBcBW9vqaPxiT8sk2MBFkCeinNSDHTdQ2uwIDAQAB";

private const string SAMPLE_PRIVATE_KEY =
"MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJLbedwNLvHyeZ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m5Vxs1ccJi7sbsT8WANf3r2Vs1Ddg-PExdlvPjEwgvItksGh8dcaKAlC2N8vav4psJFHKLM8zfXX5lKZd6FaMscHI_RECQQD_ZR4c6R1PT9Wpnt8SfIwKIkv_4Ez4Z2zA-NN0FxLLO4BxhhhIJwD7OfNyvcupaOg1iM4sCtxVgRBAYpJTDGwNAkEAxfwvaxiv1zDt0uTAArDXgl-ZA5CVidsl_5zhmojMPbbG4enDBGGMZoh8H-G4HIZHOGsoPCkShbJnI8KtLtDT5wJANnHE-J7Na8H2J4HBxjwc0nA7SWH0pqPNsFmbIk1k6URW_lx6wq7l66iP-G7zgrrlfbwbT5JFJEkuQLuCvAeS5QJBAJZWohc73sKUN_NtmlQwvuUT_JgVYUgWLiuEkFeNSzINqcYAgQLBpCBzwXVgLDMUz94KmLneIl99kg44lNM45b8CQEIxv-OnXq0u6tCdp_rhRxVH0ywlA3lXYsXQ8HxbA8dqRiSQKR8AIaOtG8_iCk4ymtYAcFhM9HjR1mtdBkXLflU=";

[SerializeField] private ContractsSO _contracts;

/**
Expand Down Expand Up @@ -164,12 +171,40 @@ public override List<Blockchain> GetAllBlockchains()

public override string GetApiKey()
{
return string.IsNullOrEmpty(this._apiKey) ? SAMPLE_API_KEY : this._apiKey;
if (!string.IsNullOrEmpty(this._apiKey))
{
return this._apiKey;
}

return GetSampleApiKey();
}

public string GetSampleApiKey()
{
if (this.GetEnv() == Profile.ProdMainnet)
{
return PM_SAMPLE_API_KEY;
}
return SAMPLE_API_KEY;
}

public override string GetPrivateKey()
{
return string.IsNullOrEmpty(this._privateKey) ? SAMPLE_PRIVATE_KEY : this._privateKey;
if (!string.IsNullOrEmpty(this._apiKey))
{
return this._apiKey;
}

return GetSamplePrivateKey();
}

public string GetSamplePrivateKey()
{
if (this.GetEnv() == Profile.ProdMainnet)
{
return PM_SAMPLE_PRIVATE_KEY;
}
return SAMPLE_PRIVATE_KEY;
}

public override string GetMultiStageId()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,15 @@ private void Initialize()
b => this._blockchainDropdown.options.Add(new TMP_Dropdown.OptionData(b.ToString())));
this._blockchainDropdown.captionText.text = this._blockchainDropdown.options[0].text;

this._apiKeyInputField.text = this._appState.GetApiKey();
this._apiKeyInputField.text = this._appState.GetSampleApiKey();
this._privateKeyInputField.text = this._appState.GetSamplePrivateKey();
}

private void OnEnvChanges(int dropdownIndex)
{
this._changeProfile.RaiseEvent(this._envDropdown.options[dropdownIndex].text);
this._apiKeyInputField.text = this._appState.GetSampleApiKey();
this._privateKeyInputField.text = this._appState.GetSamplePrivateKey();
}

private void OnBlockchainChanges(int dropdownIndex)
Expand Down

0 comments on commit d0e8d91

Please sign in to comment.