Beispiel #1
0
    def _accountFromDict(self, account_id, accountInfo):
        from bitshares.account import Account

        account = Account.__new__(Account)
        account.identifier = account_id
        account.bitshares = self.bts
        account.account_id = account_id
        account.cached = True
        account.full = True
        #	bitshares_instance=self.bts,
        #account = Account(accountInfo)
        for key, val in accountInfo.items():
            if key == "balances":
                key = "_balances"
            try:
                setattr(account, key, val)
            except Exception as e:
                if not (key in ["name"]):
                    print(str(e), key, val)
            account[key] = val

        return account