Skip to content

Commit

Permalink
fix: Connect Player Wallet Mock wallet overiding bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
saszer committed Jul 17, 2022
1 parent d93ce27 commit 5a19adc
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions Editor/ConnectPlayerWallet_Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ namespace NFTPort.Editor
[CustomEditor(typeof(ConnectPlayerWallet))]
public class ConnectPlayerWallet_Editor : Editor
{
public string mockWallet = "0x3691Ca2c8D2051f0B8b9d4aCb8941771aBc1bf9b";
public string mockNetworkID = "1";

private ConnectPlayerWallet myScript;
public override void OnInspectorGUI()
{

myScript = (ConnectPlayerWallet) target;
SetMocks();

//Texture banner = Resources.Load<Texture>("c_pminteasyURL");
GUILayout.BeginHorizontal();
Expand All @@ -37,31 +34,15 @@ public override void OnInspectorGUI()
EditorGUILayout.LabelField("");
if (GUILayout.Button("Mock Wallet Connect", GUILayout.Height(25)))
{
SetMocks();
myScript.WebSend_GetAddress();
}


EditorGUILayout.HelpBox("Input a wallet address below to mock a connected wallet in editor at 'Port.ConnectedPlayerAddress'", MessageType.Info);

mockWallet = EditorGUILayout.TextField("Mock Wallet", mockWallet);
mockNetworkID = EditorGUILayout.TextField("Mock NetworkID", mockNetworkID);

EditorGUILayout.LabelField("");

GuiLine();

EditorGUILayout.LabelField("");

DrawDefaultInspector();
}

void SetMocks()
{
myScript.MockconnectedWalletAddress = mockWallet;
myScript.MockconnectedNetworkID = mockNetworkID;
}

static void GuiLine( int i_height = 1 )
{
Rect rect = EditorGUILayout.GetControlRect(false, i_height );
Expand Down

0 comments on commit 5a19adc

Please sign in to comment.