Skip to content

Commit

Permalink
Merge pull request #1301 from xchainjs/mayachain-streaming-parameters
Browse files Browse the repository at this point in the history
doSwap streaming parameters bug fix
  • Loading branch information
0xp3gasus authored Oct 9, 2024
2 parents da2d89f + 1aab796 commit ffd7c09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/nice-eyes-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@xchainjs/xchain-mayachain-amm': patch
---

doSwap streaming parameters bug fix
4 changes: 4 additions & 0 deletions packages/xchain-mayachain-amm/src/mayachain-amm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ export class MayachainAMM {
affiliateAddress,
affiliateBps,
toleranceBps,
streamingInterval,
streamingQuantity,
}: QuoteSwapParams): Promise<TxSubmitted> {
const quoteSwap = await this.estimateSwap({
fromAsset,
Expand All @@ -227,6 +229,8 @@ export class MayachainAMM {
affiliateAddress,
affiliateBps,
toleranceBps,
streamingInterval,
streamingQuantity,
})
// Check if the swap can be performed
if (!quoteSwap.canSwap) throw Error(`Can not swap. ${quoteSwap.errors.join(' ')}`)
Expand Down

0 comments on commit ffd7c09

Please sign in to comment.