Closed mmdhrumil closed 7 months ago
Update: Always adding seat claiming instruction instead of checking whether initialized or not should work. One sub-optimality is that we may be adding seat claiming instruction even if the seat is approved, but the instruction call will be light-weight and won't cost substantially more compute units
Problem: If the trader acquired a seat initially and got it evicted later, the
getMakerSetupInstructionsForMarket()
function call during the next trade won't return the necessary instructions to claim the seat because currently it only checks if the data at the seat account is initialized, hence fails to check if the seat status is evicted/retiredSolution: Also add an explicit check here if the seat status is evicted/retired and add the getClaimSeatIx() instructions if needed https://github.com/Ellipsis-Labs/phoenix-sdk/blob/master/typescript/phoenix-sdk/src/utils/seatManager.ts#L190