Skip to content

Commit 255d263

Browse files
balogh.adam@icloud.combalogh.adam@icloud.com
authored andcommitted
dummy portfolio
1 parent 233c9a0 commit 255d263

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

onchain/portfolio/solana_portfolio.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ async def close(self):
2525

2626
@alru_cache(maxsize=1_000_000, ttl=60*60)
2727
async def get_portfolio(self, wallet_address: str) -> Portfolio:
28+
if wallet_address == "":
29+
return Portfolio(holdings=[], total_value_usd=0)
30+
2831
"""Get the complete portfolio of token holdings for a wallet address."""
2932
token_accounts = await self._get_token_accounts(wallet_address)
3033
holdings: List[WalletTokenHolding] = []

server/fastapi_server.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,12 @@ async def get_portfolio(
236236
if not address:
237237
raise HTTPException(status_code=400, detail="Address parameter is required")
238238

239-
portfolio = await portfolio_fetcher.get_portfolio(address)
240-
return portfolio.model_dump()
239+
# portfolio = await portfolio_fetcher.get_portfolio(address)
240+
# return portfolio.model_dump()
241+
242+
# TODO: Revert this once load is under control
243+
return Portfolio(holdings=[], total_value_usd=0).model_dump()
244+
241245

242246
@app.get("/api/tokenlist")
243247
async def get_tokenlist():

0 commit comments

Comments
 (0)