private async Task <JsonElement?> FetchAccount(string address) { ResultOfWaitForCollection result = await _tonClient.Net.WaitForCollection(new ParamsOfWaitForCollection { Collection = "accounts", Filter = new { id = new { eq = address } }.ToJsonElement(), Result = "id boc" }); return(result.Result); }
public async Task WaitFor() { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); // get new client here to avoid lock another tests var request = GetNewClient().Net.WaitForCollection(new ParamsOfWaitForCollection { Collection = "transactions", Filter = new { now = new { gt = now } }.ToJsonElement(), Result = "id now" }); await Task.Delay(TimeSpan.FromSeconds(1)); await _tonClient.SendGramsFromLocalGiver(); ResultOfWaitForCollection result = await request; result.Result.Get <long>("now").Should().BeGreaterThan(now); }