diff --git a/Runtime/codebase/Web3.cs b/Runtime/codebase/Web3.cs index 725a186..adc21bf 100644 --- a/Runtime/codebase/Web3.cs +++ b/Runtime/codebase/Web3.cs @@ -99,6 +99,7 @@ public static event BalanceChange OnBalanceChange private static List _nfts = new(); private static bool _isLoadingNfts; + public static int NftLoadingRequestsDelay { get; set; } = 0; public delegate void NFTsUpdate(List nfts, int total); private static event NFTsUpdate OnNFTsUpdateInternal; @@ -372,7 +373,7 @@ public static async UniTask UpdateNFTs(Commitment commitment = Commitment.Confir if (Application.platform == RuntimePlatform.WebGLPlayer) { // If we are on WebGL, we need to add a min delay between requests - requestsMillisecondsDelay = Mathf.Max(requestsMillisecondsDelay, 100); + requestsMillisecondsDelay = Mathf.Max(requestsMillisecondsDelay, 100, NftLoadingRequestsDelay); } if (requestsMillisecondsDelay > 0) await UniTask.Delay(requestsMillisecondsDelay); @@ -395,7 +396,7 @@ public static async UniTask UpdateNFTs(Commitment commitment = Commitment.Confir _nfts = nfts; return nfts; } - + private static async UniTask SubscribeToWalletEvents(Commitment commitment = Commitment.Confirmed) { if(WsRpc == null) return;