Skip to content

Commit

Permalink
Prevent disallowed buffers on SOR paths (#1337)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoguerios authored Dec 16, 2024
1 parent cf338a6 commit 8b462a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-spiders-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'backend': patch
---

Prevent disallowed buffers on SOR paths
2 changes: 1 addition & 1 deletion modules/sor/sorV2/lib/poolsV3/stable/stablePool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class StablePool implements BasePoolV3 {
const scale18 = parseEther(poolToken.balance);
const tokenAmount = TokenAmount.fromScale18Amount(token, scale18);

if (poolToken.token.underlyingTokenAddress) {
if (poolToken.token.underlyingTokenAddress && poolToken.token.isBufferAllowed) {
poolTokens.push(
new Erc4626PoolToken(
token,
Expand Down
2 changes: 1 addition & 1 deletion modules/sor/sorV2/lib/poolsV3/weighted/weightedPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class WeightedPoolV3 implements BasePoolV3 {
);
const scale18 = parseEther(poolToken.balance);
const tokenAmount = TokenAmount.fromScale18Amount(token, scale18);
if (poolToken.token.underlyingTokenAddress) {
if (poolToken.token.underlyingTokenAddress && poolToken.token.isBufferAllowed) {
// erc4626 token
poolTokens.push(
new WeightedErc4626PoolToken(
Expand Down

0 comments on commit 8b462a2

Please sign in to comment.