Ejemplo n.º 1
0
        private IEnumerator GetBalanceCoroutine()
        {
            yield return(EOTClient.Instance.GetUserBalance(_username));

            ProcessingAnimPanel.SetActive(false);
            UserBalanceResult userBalanceResult = EOTClient.Instance.UserBalanceResult;

            if (userBalanceResult.Code == EOTConstant.CODE_SUCCESS)
            {
                List <Token> tokeList = userBalanceResult.Balance;
                foreach (Token token in tokeList)
                {
                    if (token.tokenCode == TokenCode.ETH)
                    {
                        BalanceInfo.text = "ETH: " + token.amount;
                        break;
                    }
                }
            }
            else
            {
                ErrorMsg.text = userBalanceResult.Msg;
                ErrorMsgPanel.SetActive(true);
            }
        }
Ejemplo n.º 2
0
        private EOTClient(string appID, string appKey)
        {
            _appID  = appID;
            _appKey = appKey;

            UserVerifyResult   = new UserVerifyResult();
            UserTransferResult = new UserTransferResult();
            UserBalanceResult  = new UserBalanceResult();
        }