// POST: /view/wallet-balance public static HttpResponse ViewWalletBalance(HttpRequest request) { ViewWalletRequest requestData = JsonConvert.DeserializeObject <ViewWalletRequest>(request.Content); ViewerController controller = new ViewerController(); var response = controller.GetWalletBalance(requestData.Address, requestData.TokenSymbol); return(CreateHttpResponse(response)); }
private void ShowBalance(string symbol, string address) { ViewWalletRequest data = new ViewWalletRequest(); data.Address = address; data.TokenSymbol = symbol; string endpoint = nodeServerAddress + "/view/wallet-balance"; string responseData = this.SendPostRequest(endpoint, JsonConvert.SerializeObject(data)); Log("Response:" + responseData); }