Skip to content

Commit

Permalink
fix fee-deposit-account view
Browse files Browse the repository at this point in the history
  • Loading branch information
yukonet committed Dec 4, 2024
1 parent 41681d4 commit 972b7fe
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,16 @@ def dump():

@api.post('/fee-deposit-account')
def get_fee_deposit_account():
token_instance = Token(g.symbol)
return {'account': token_instance.get_fee_deposit_account(),
'balance': token_instance.get_fee_deposit_account_balance()}
if g.symbol == 'ETH':
coin_instance = Coin(g.symbol)
return {'account': coin_instance.get_fee_deposit_account(),
'balance': coin_instance.get_fee_deposit_coin_balance()}
elif g.symbol in config['TOKENS'][config["CURRENT_ETH_NETWORK"]].keys():
token_instance = Token(g.symbol)
return {'account': token_instance.get_fee_deposit_account(),
'balance': token_instance.get_fee_deposit_account_balance()}
else:
raise Exception(f'Symbol {g.symbol} cannot be processed')

@api.post('/get_all_addresses')
def get_all_addresses():
Expand Down

0 comments on commit 972b7fe

Please sign in to comment.