Skip to content

Commit

Permalink
fix(fusion-order): correct handle for default values
Browse files Browse the repository at this point in the history
  • Loading branch information
vbrvk committed Mar 22, 2024
1 parent 8f7d22a commit c9ac283
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/fusion-order/fusion-order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,21 @@ export class FusionOrder {
enablePermit2?: boolean
} = FusionOrder.defaultExtra
) {
const {
allowPartialFills,
allowMultipleFills,
unwrapWETH,
enablePermit2,
orderExpirationDelay,
nonce,
permit
} = {
...FusionOrder.defaultExtra,
...extra
}
const allowPartialFills =
extra.allowPartialFills ??
FusionOrder.defaultExtra.allowPartialFills
const allowMultipleFills =
extra.allowMultipleFills ??
FusionOrder.defaultExtra.allowMultipleFills
const unwrapWETH =
extra.unwrapWETH ?? FusionOrder.defaultExtra.unwrapWETH
const enablePermit2 =
extra.enablePermit2 ?? FusionOrder.defaultExtra.enablePermit2
const orderExpirationDelay =
extra.orderExpirationDelay ??
FusionOrder.defaultExtra.orderExpirationDelay

const {nonce, permit} = extra

const deadline =
auctionDetails.startTime +
Expand Down

0 comments on commit c9ac283

Please sign in to comment.