Skip to content

Commit

Permalink
fixup: Format Python code with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
mikewcasale committed Sep 14, 2022
1 parent 1ee7593 commit 3b46365
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bancor_research/bancor_simulator/v3/spec/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bancor_research/bancor_simulator/v3/spec/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3b46365

Please sign in to comment.