Skip to content

Commit 1f488dc

Browse files
committed
Changes from testing
1 parent 64af894 commit 1f488dc

File tree

6 files changed

+24
-13
lines changed

6 files changed

+24
-13
lines changed

Assets/MoralisWeb3ApiSdk/Example/DemoScene.unity

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18732,7 +18732,7 @@ MonoBehaviour:
1873218732
wallets:
1873318733
- Id: 09102e7bbbd3f92001eda104abe23803181629f695e8f1b95af96d88ff7d5890
1873418734
Name: 1inch Wallet
18735-
Selected: 0
18735+
Selected: 1
1873618736
- Id: a0718f5fb1493e4aaac72cff62d162cb85db40ed68fd8700298f36f1d5c4b73d
1873718737
Name: AirGap
1873818738
Selected: 0
@@ -18819,7 +18819,7 @@ MonoBehaviour:
1881918819
Selected: 0
1882018820
- Id: f2436c67184f158d1beda5df53298ee84abfc367581e4505134b5bcf5f46697d
1882118821
Name: Crypto.com | DeFi Wallet
18822-
Selected: 0
18822+
Selected: 1
1882318823
- Id: a395dbfc92b5519cbd1cc6937a4e79830187daaeb2c6fcdf9b9cce4255f2dcd5
1882418824
Name: CYBAVO Wallet
1882518825
Selected: 0
@@ -18885,10 +18885,10 @@ MonoBehaviour:
1888518885
Selected: 0
1888618886
- Id: bae74827272509a6d63ea25514d9c68ad235c14e45e183518c7ded4572a1b0c4
1888718887
Name: Huobi Wallet
18888-
Selected: 0
18888+
Selected: 1
1888918889
- Id: 9d373b43ad4d2cf190fb1a774ec964a1addf406d6fd24af94ab7596e58c291b2
1889018890
Name: imToken
18891-
Selected: 0
18891+
Selected: 1
1889218892
- Id: d0387325e894a1c4244820260ad7c78bb20d79eeec2fd59ffe3529223f3f84c6
1889318893
Name: Infinito
1889418894
Selected: 0
@@ -18927,7 +18927,7 @@ MonoBehaviour:
1892718927
Selected: 0
1892818928
- Id: c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96
1892918929
Name: MetaMask
18930-
Selected: 0
18930+
Selected: 1
1893118931
- Id: 1e04cf5cddcd84edb1370b12eae1fcecedf125b77209fff80e7ef2a6d3c74719
1893218932
Name: Midas Wallet
1893318933
Selected: 0
@@ -18975,7 +18975,7 @@ MonoBehaviour:
1897518975
Selected: 0
1897618976
- Id: 1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369
1897718977
Name: Rainbow
18978-
Selected: 0
18978+
Selected: 1
1897918979
- Id: b13fcc7e3500a4580c9a5341ed64c49c17d7f864497881048eb160c089be5346
1898018980
Name: RWallet
1898118981
Selected: 0
@@ -19023,7 +19023,7 @@ MonoBehaviour:
1902319023
Selected: 0
1902419024
- Id: 4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0
1902519025
Name: Trust Wallet
19026-
Selected: 0
19026+
Selected: 1
1902719027
- Id: 1ce6dae0fea7114846382391d946784d95d9032460a857bb23b55bd9807259d1
1902819028
Name: Trustee Wallet
1902919029
Selected: 0
@@ -47690,6 +47690,10 @@ PrefabInstance:
4769047690
m_Modification:
4769147691
m_TransformParent: {fileID: 0}
4769247692
m_Modifications:
47693+
- target: {fileID: 6266890725912523073, guid: 116667ed98661304da1568439e2a3426, type: 3}
47694+
propertyPath: Version
47695+
value: 1.0.9
47696+
objectReference: {fileID: 0}
4769347697
- target: {fileID: 6266890725912523073, guid: 116667ed98661304da1568439e2a3426, type: 3}
4769447698
propertyPath: walletConnect
4769547699
value:

Assets/MoralisWeb3ApiSdk/Example/Scripts/MainMenuScript.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
using Moralis.WebGL;
4444
using Moralis.WebGL.Platform;
4545
using Moralis.WebGL.Platform.Objects;
46+
using Moralis.WebGL.Platform.Services.ClientServices;
4647
using Moralis.WebGL.Web3Api.Models;
4748
#else
4849
using System.Threading.Tasks;
@@ -106,6 +107,12 @@ async void Start()
106107
}
107108
}
108109

110+
#if UNITY_WEBGL
111+
private void FixedUpdate()
112+
{
113+
MoralisLiveQueryManager.UpdateWebSockets();
114+
}
115+
#endif
109116
/// <summary>
110117
/// Used to start the authentication process and then run the game. If the
111118
/// user has a valid Moralis session thes user is redirected to the next
@@ -273,12 +280,12 @@ public async void Quit()
273280
{
274281
Debug.Log("QUIT");
275282

283+
// Logout the Moralis User.
284+
await MoralisInterface.LogOutAsync();
276285
// Disconnect wallet subscription.
277286
await walletConnect.Session.Disconnect();
278287
// CLear out the session so it is re-establish on sign-in.
279288
walletConnect.CLearSession();
280-
// Logout the Moralis User.
281-
await MoralisInterface.LogOutAsync();
282289
// Close out the application.
283290
Application.Quit();
284291
}

Assets/MoralisWeb3ApiSdk/Moralis/Moralis.Web3Api/Client/ApiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class ApiClient
2525
/// Initializes a new instance of the <see cref="ApiClient" /> class.
2626
/// </summary>
2727
/// <param name="basePath">The base path.</param>
28-
public ApiClient(String basePath = "http://localhost:3063", string apiVersion= "/api/v2")
28+
public ApiClient(String basePath = "http://localhost:3063", string apiVersion="/api/v2")
2929
{
3030
BasePath = basePath;
3131
RestClient = new HttpClient(); //new RestClient(BasePath);

Assets/MoralisWeb3ApiSdk/Moralis/Moralis.Web3Api/Client/Web3ApiClient.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ public void Initialize(string serverUrl=null)
8383
// and Cloud Function API should be used.
8484
else
8585
{
86+
client.ApiVersion = "server";
87+
8688
this.Account = new Moralis.Web3Api.CloudApi.AccountApi(client);
8789
this.Defi = new Moralis.Web3Api.CloudApi.DefiApi(client);
8890
this.Native = new Moralis.Web3Api.CloudApi.NativeApi(client);

Assets/MoralisWeb3ApiSdk/Moralis/Moralis.WebGL/MoralisDotNet/Platform/Queries/Live/SubscribableWebSocket.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public async void Subscribe()
9999
}
100100

101101
bool msgSent = false;
102-
102+
103103
public void PingWebsocket ()
104104
{
105105
if (!connected) return;

Assets/MoralisWeb3ApiSdk/Moralis/Moralis.WebGL/MoralisDotNet/Platform/Services/ClientServices/UniversalWebClient.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ public async UniTask<Tuple<HttpStatusCode, string>> ExecuteAsync(WebRequest http
8181

8282
try
8383
{
84-
string x = JsonConvert.SerializeObject(webRequest);
85-
Debug.Log($"\n\nWebRequest\n----------\v{x}\n\n");
8684
await webRequest.SendWebRequest();
8785
}
8886
catch (Exception exp)

0 commit comments

Comments
 (0)