remove mocel0xAddress
This commit is contained in:
parent
697dbd5c42
commit
56cd5155f7
@ -9,7 +9,6 @@ import six
|
||||
from cic_eth.api.api_task import Api
|
||||
from cic_eth.graphql.config import config
|
||||
from cic_eth.server import util
|
||||
from cic_eth.server.models.model0x_address import Model0xAddress # noqa: E501
|
||||
from cic_eth.server.models.token import Token # noqa: E501
|
||||
from cic_eth.server.models.token_balance import TokenBalance # noqa: E501
|
||||
|
||||
@ -87,7 +86,7 @@ def account_balance(address, token_symbol, include_pending=True): # noqa: E501
|
||||
data = task.get() # api call('balance', address, token_symbol, include_pending)
|
||||
log.debug(data)
|
||||
#[{'address': '3ff776b6f888980def9d4220858803f9dc5e341e', 'converters': [], 'balance_network': 0}]
|
||||
return data
|
||||
return list(map(lambda b : TokenBalance(**b), data))
|
||||
|
||||
|
||||
def create_account_post(password, register): # noqa: E501
|
||||
|
@ -3,6 +3,5 @@
|
||||
# flake8: noqa
|
||||
from __future__ import absolute_import
|
||||
# import models into model package
|
||||
from cic_eth.server.models.model0x_address import Model0xAddress
|
||||
from cic_eth.server.models.token import Token
|
||||
from cic_eth.server.models.token_balance import TokenBalance
|
||||
|
@ -1,37 +0,0 @@
|
||||
# coding: utf-8
|
||||
|
||||
from __future__ import absolute_import
|
||||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from cic_eth.server.models.base_model_ import Model
|
||||
from cic_eth.server import util
|
||||
|
||||
|
||||
class Model0xAddress(Model):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self): # noqa: E501
|
||||
"""Model0xAddress - a model defined in Swagger
|
||||
|
||||
"""
|
||||
self.swagger_types = {
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'Model0xAddress':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The 0xAddress of this Model0xAddress. # noqa: E501
|
||||
:rtype: Model0xAddress
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
@ -15,7 +15,7 @@ class TokenBalance(Model):
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, address: str = None, converters: List[str] = None, balance_network: int = None, balance_incoming: int = None, balance_outgoing: int = None, balance_available: int = None): # noqa: E501
|
||||
def __init__(self, address: str = None, converters: List[str] = None, balance_network: int = None, balance_incoming: int = None, balance_outgoing: int = None): # noqa: E501
|
||||
"""TokenBalance - a model defined in Swagger
|
||||
|
||||
:param address: The address of this TokenBalance. # noqa: E501
|
||||
@ -53,7 +53,7 @@ class TokenBalance(Model):
|
||||
self._balance_network = balance_network
|
||||
self._balance_incoming = balance_incoming
|
||||
self._balance_outgoing = balance_outgoing
|
||||
self._balance_available = balance_available
|
||||
self._balance_available = int(balance_network) + int(balance_incoming) - int(balance_outgoing)
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'TokenBalance':
|
||||
|
Loading…
Reference in New Issue
Block a user