File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ] = []
Original file line number Diff line number Diff 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 ():
You can’t perform that action at this time.
0 commit comments