diff --git a/src/driftpy/clearing_house_user.py b/src/driftpy/clearing_house_user.py index 13ae9c0e..e356f8ce 100644 --- a/src/driftpy/clearing_house_user.py +++ b/src/driftpy/clearing_house_user.py @@ -66,9 +66,13 @@ def __init__( # get_user # if state = cache => get cached_market else get new market - async def set_cache(self): + async def set_cache(self, CACHE=None): self.cache_is_set = True + if CACHE is not None: + self.CACHE = CACHE + return + self.CACHE = {} state = await get_state_account(self.program) self.CACHE['state'] = state