Skip to content

Commit

Permalink
(feat) remove cache from accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
cardosofede committed Jun 21, 2024
1 parent 2a9b28b commit 0759580
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions frontend/pages/orchestration/portfolio/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@
NUM_COLUMNS = 4


@st.cache_data
def get_accounts_state():
return client.get_accounts_state()


@st.cache_data
def get_account_state_history():
return client.get_account_state_history()


# Convert balances to a DataFrame for easier manipulation
def account_state_to_df(account_state):
data = []
Expand Down Expand Up @@ -61,8 +51,8 @@ def account_history_to_df(history):


# Fetch account state from the backend
account_state = get_accounts_state()
account_history = get_account_state_history()
account_state = client.get_accounts_state()
account_history = client.get_account_state_history()


# Display the accounts available
Expand All @@ -84,7 +74,8 @@ def account_history_to_df(history):
if exchange in account_state[account]:
tokens_available += [info["token"] for info in account_state[account][exchange]]

tokens_available = st.multiselect("Select Tokens", set(tokens_available), set(tokens_available))
token_options = set(tokens_available)
tokens_available = st.multiselect("Select Tokens", token_options, token_options)


st.write("---")
Expand Down

0 comments on commit 0759580

Please sign in to comment.