Skip to content

Commit

Permalink
feat: receiver getter
Browse files Browse the repository at this point in the history
  • Loading branch information
vbrvk committed Jan 28, 2025
1 parent cbd6869 commit e317347
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/fusion-order/fusion-order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,13 @@ export class FusionOrder {
}

get receiver(): Address {
return this.inner.receiver
const hasFee = Boolean(this.fusionExtension.extra?.fees)

const receiver = hasFee
? this.fusionExtension.extra?.customReceiver
: this.inner.receiver

return receiver && !receiver.isZero() ? receiver : this.maker
}

/**
Expand Down

0 comments on commit e317347

Please sign in to comment.