public override void ResetSeed() { string seed = ""; while (seed.Length < 12) { seed += R.Next(0, int.MaxValue).ToString(); } string loginjson = json.JsonSerializer <WDResetSeed>(new WDResetSeed() { value = seed }); HttpContent cont = new StringContent(loginjson); cont.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json"); HttpResponseMessage resp2 = Client.PostAsync("seed", cont).Result; if (resp2.IsSuccessStatusCode) { string response = resp2.Content.ReadAsStringAsync().Result; WDGetSeed tmpBalance = json.JsonDeserialize <WDGetSeed>(response); if (tmpBalance.status == "success") { getseed(); } } }
bool getseed() { string response = Client.GetStringAsync("seed").Result; WDGetSeed tmpBalance = json.JsonDeserialize <WDGetSeed>(response); if (tmpBalance.data != null) { currentseed = tmpBalance.data; } return(tmpBalance.status == "success"); }