Skip to content

Commit

Permalink
update for ExtendedCurveHistory
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Jan 30, 2022
1 parent 471ade2 commit cac681f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/driftpy/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ async def initialize(
program.account["DepositHistory"].create_instruction(
deposit_history
),
program.account["CurveHistory"].create_instruction(curve_history),
program.account["ExtendedCurveHistory"].create_instruction(
curve_history
),
),
signers=[
deposit_history,
Expand Down
6 changes: 3 additions & 3 deletions src/driftpy/clearing_house.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
TradeHistoryAccount,
LiquidationHistoryAccount,
DepositHistoryAccount,
CurveHistoryAccount,
ExtendedCurveHistoryAccount,
User,
UserPositions,
)
Expand Down Expand Up @@ -119,9 +119,9 @@ async def get_deposit_history_account(self) -> DepositHistoryAccount:
)
return cast(DepositHistoryAccount, res)

async def get_curve_history_account(self) -> CurveHistoryAccount:
async def get_curve_history_account(self) -> ExtendedCurveHistoryAccount:
res = await self.program.account["CurveHistory"].fetch(self.pdas.curve_history)
return cast(CurveHistoryAccount, res)
return cast(ExtendedCurveHistoryAccount, res)

@staticmethod
def _get_state_pubkey(program: Program) -> PublicKey:
Expand Down

0 comments on commit cac681f

Please sign in to comment.