Skip to content

Commit

Permalink
fix: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
vbrvk committed Jan 28, 2025
1 parent 04bc4af commit 84d9dd2
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/fusion-order/fusion-order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,15 @@ export class FusionOrder {
return this.inner.makingAmount
}

get receiver(): Address {
/**
* Returns actual receiver of funds
*
* Do not use this field to pass to order struct as it can lead to lost of funds
* For such cases use `order.receiver`
*
* @see receiver
*/
get realReceiver(): Address {
const hasFee = Boolean(this.fusionExtension.extra?.fees)

const receiver = hasFee
Expand All @@ -188,6 +196,15 @@ export class FusionOrder {
return receiver && !receiver.isZero() ? receiver : this.maker
}

/**
* Receiver from order struct
*
* @see realReceiver
*/
get receiver(): Address {
return this.inner.receiver
}

/**
* Timestamp in sec
*/
Expand Down

0 comments on commit 84d9dd2

Please sign in to comment.