diff --git a/packages/inter-protocol/src/auction/offerBook.js b/packages/inter-protocol/src/auction/offerBook.js index 75d4abf90f12..e45eb1988a0d 100644 --- a/packages/inter-protocol/src/auction/offerBook.js +++ b/packages/inter-protocol/src/auction/offerBook.js @@ -147,6 +147,12 @@ export const prepareScaledBidBook = (baggage, makeRecorderKit) => { publishOffer(record) { const key = toScaledRateOfferKey(record.bidScaling, record.seqNum); + // users can exit seats + if (record.seat.hasExited()) { + this.self.delete(key); + return; + } + return E(getBidDataRecorder(key)).write( harden({ bidScaling: record.bidScaling, @@ -290,6 +296,12 @@ export const preparePriceBook = (baggage, makeRecorderKit) => { publishOffer(record) { const key = toPriceOfferKey(record.price, record.seqNum); + // users can exit seats + if (record.seat.hasExited()) { + this.self.delete(key); + return; + } + return E(getBidDataRecorder(key)).write( harden({ price: record.price,