Skip to content

Commit

Permalink
Fix broken test.
Browse files Browse the repository at this point in the history
  • Loading branch information
johngrantuk committed Aug 30, 2023
1 parent c4c8c1c commit ee41143
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions balancer-js/examples/swaps/advanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,13 @@ async function getAndProcessSwaps(
}

async function swapExample() {
const network = Network.POLYGON;
const rpcUrl = 'https://rpc.ankr.com/polygon';
const tokenIn = '0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4'; // stMatic
const tokenOut = AddressZero; // Matic
const network = Network.MAINNET;
const rpcUrl =
'https://eth-mainnet.alchemyapi.io/v2/jlO5Azkh0eRPDXDXGgIZONS3wRkI1haM';
const tokenIn = AddressZero; // stMatic
const tokenOut = '0x6B175474E89094C44Da98b954EedeAC495271d0F'; // Matic
const swapType = SwapTypes.SwapExactIn;
const amount = parseFixed('20', 18);
const amount = parseFixed('1', 18);
// Currently Relayer only suitable for ExactIn and non-eth swaps
const canUseJoinExitPaths = canUseJoinExit(swapType, tokenIn, tokenOut);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ describe('ComposableStable - recovery', () => {
context('buildRecoveryExit', async () => {
context('PoolWithMethods', async () => {
it('should recovery exit', async () => {
const bptAmount = parseFixed('1.34', 18).toString();
const bptAmount = parseFixed('0.001', 18).toString();
const slippage = '10'; // 10 bps = 0.1%
const pool = await balancer.pools.find(poolId);
if (!pool) throw Error('Pool not found');
Expand All @@ -252,7 +252,7 @@ describe('ComposableStable - recovery', () => {
});
context('Pool & refresh', async () => {
it('should recovery exit', async () => {
const bptAmount = parseFixed('1.34', 18).toString();
const bptAmount = parseFixed('0.00001', 18).toString();
const slippage = '10'; // 10 bps = 0.1%
let pool = await balancer.data.pools.find(poolId);
if (!pool) throw Error('Pool not found');
Expand Down

0 comments on commit ee41143

Please sign in to comment.