-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #481 from balancer/375-priceimpact-error-messaging…
…-improvement 375 priceimpact error messaging improvement
- Loading branch information
Showing
5 changed files
with
254 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@balancer/sdk": patch | ||
--- | ||
|
||
PriceImpact error handling and messaging improvements. | ||
* Catch any errors with initial add/remove steps - these are thrown because the user input is valid, e.g. would cause INVARIANT_GROWTH errors | ||
* Catch any errors in query during unbalanced calc steps and throw message that will help with debug - e.g. caused by delta amounts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { PoolState } from '@/entities'; | ||
import { PoolType } from '@/types'; | ||
import { ChainId } from '@/utils'; | ||
import { POOLS, TOKENS } from 'test/lib/utils'; | ||
|
||
const chainId = ChainId.SEPOLIA; | ||
export const MOCK_WETH_BAL_POOL = POOLS[chainId].MOCK_WETH_BAL_POOL; | ||
export const WETH = TOKENS[chainId].WETH; | ||
const BAL = TOKENS[chainId].BAL; | ||
|
||
export const weightedWethBal: PoolState = { | ||
id: MOCK_WETH_BAL_POOL.id, | ||
address: MOCK_WETH_BAL_POOL.address, | ||
type: PoolType.Weighted, | ||
protocolVersion: 3, | ||
tokens: [ | ||
{ | ||
address: WETH.address, | ||
decimals: WETH.decimals, | ||
index: 0, | ||
}, | ||
{ | ||
address: BAL.address, | ||
decimals: BAL.decimals, | ||
index: 1, | ||
}, | ||
], | ||
}; |
Oops, something went wrong.