diff --git a/bancor_research/bancor_simulator/v3/spec/network.py b/bancor_research/bancor_simulator/v3/spec/network.py index 5a72360..eb8f7e7 100644 --- a/bancor_research/bancor_simulator/v3/spec/network.py +++ b/bancor_research/bancor_simulator/v3/spec/network.py @@ -19,6 +19,7 @@ def to_decimal(percent: str): except TypeError: return percent + def to_user_amount(state: State, tkn_name: str, user_name: str, amount: str): if amount.endswith("%"): return get_user_balance(state, user_name, tkn_name) * to_decimal(amount) @@ -429,7 +430,7 @@ def whitelist_token(self, tkn_name: str, timestamp: int = 0): """ state = self.get_state(copy_type="initial", timestamp=timestamp) tkn_name = tkn_name.lower() - state.price_feeds[tkn_name]=[0 for _ in range(len(state.price_feeds))] + state.price_feeds[tkn_name] = [0 for _ in range(len(state.price_feeds))] state.create_whitelisted_tkn(tkn_name) handle_whitelisting_tokens(state) diff --git a/bancor_research/bancor_simulator/v3/spec/state.py b/bancor_research/bancor_simulator/v3/spec/state.py index 4296dd8..5728bea 100644 --- a/bancor_research/bancor_simulator/v3/spec/state.py +++ b/bancor_research/bancor_simulator/v3/spec/state.py @@ -777,7 +777,7 @@ def create_whitelisted_tkn(self, tkn_name: str): "decimals": 18, "trading_fee": DEFAULT_TRADING_FEE, "bnt_funding_limit": DEFAULT_BNT_FUNDING_LIMIT, - "ep_vault_balance": DEFAULT.EP_VAULT_BALANCE + "ep_vault_balance": DEFAULT.EP_VAULT_BALANCE, } return self