Skip to content

Commit

Permalink
1205 aggregator affiliates (#1206)
Browse files Browse the repository at this point in the history
* Affiliate bug fix in doSwap

* Changeset version file
  • Loading branch information
0xp3gasus authored Jul 12, 2024
1 parent 184789d commit d9de5e2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/silver-pears-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@xchainjs/xchain-aggregator': patch
---

Affiliate bug fix in `doSwap` function
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ export class MayachainProtocol implements IProtocol {
* @returns {TxSubmitted} Transaction hash and URL of the swap
*/
public async doSwap(params: QuoteSwapParams): Promise<TxSubmitted> {
return this.mayachainAmm.doSwap(params)
return this.mayachainAmm.doSwap({
...params,
affiliateBps: this.configuration?.affiliateBps,
affiliateAddress: this.configuration?.affiliateAddress,
})
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ export class ThorchainProtocol implements IProtocol {
* @returns {TxSubmitted} Transaction hash and URL of the swap
*/
public async doSwap(params: QuoteSwapParams): Promise<TxSubmitted> {
return this.thorchainAmm.doSwap(params)
return this.thorchainAmm.doSwap({
...params,
affiliateBps: this.configuration?.affiliateBps,
affiliateAddress: this.configuration?.affiliateAddress,
})
}

/**x
Expand Down

0 comments on commit d9de5e2

Please sign in to comment.