コード例 #1
0
        public override Task <WithdrawalCryptoInfoResponse> GetWithdrawalCryptoInfo(WithdrawalCryptoInfoRequest request, ServerCallContext context)
        {
            var resp = new WithdrawalCryptoInfoResponse();

            resp.WithdrawalInfo = new WithdrawalCryptoInfoResponse.Types.WithdrawalCryptoInfo()
            {
                AddressExtensionMandatory = false,
                BaseAddressTitle          = "BASE-ADDRESS",
                AddressExtensionTitle     = "EXTENSION-TITLE"
            };

            return(Task.FromResult(resp));
        }
コード例 #2
0
        public override async Task <WithdrawalCryptoInfoResponse> GetWithdrawalCryptoInfo(WithdrawalCryptoInfoRequest request, ServerCallContext context)
        {
            var result = new WithdrawalCryptoInfoResponse();

            var token    = context.GetBearerToken();
            var response = await _walletApiV2Client.GetAssetInfoAsync(request.AssetId, token);

            if (response != null)
            {
                result.Body = _mapper.Map <WithdrawalCryptoInfoResponse.Types.Body>(response);
            }

            return(result);
        }