Skip to content

Commit

Permalink
fixing lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Luiz Gustavo Abou Hatem De Liz committed Oct 2, 2023
1 parent 55eed3b commit 36e684f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
13 changes: 5 additions & 8 deletions examples/exit/weighted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,14 @@ const slippage = Slippage.fromPercentage('1'); // 1%
const exit = async () => {
const balancerApi = new BalancerApi(balancerApiUrl, 1);
const poolState: PoolStateInput = await balancerApi.pools.fetchPoolState(poolId);
let client: Client & PublicActions & TestActions & WalletActions;
let bpt: Token;
// setup BPT token
bpt = new Token(chainId, poolState.address, 18, 'BPT');
client = createTestClient({
const client: Client & PublicActions & TestActions & WalletActions = createTestClient({
mode: 'hardhat',
chain: CHAINS[chainId],
transport: http(rpcUrl),
})
.extend(publicActions)
.extend(walletActions);
const bpt = new Token(chainId, poolState.address, 18, 'BPT');

await forkSetup(
client,
Expand Down Expand Up @@ -72,7 +69,7 @@ const exit = async () => {

const queryResult = await poolExit.query(exitInput, poolState);

const { call, to, value, maxBptIn, minAmountsOut } =
const { call, to, value } =
poolExit.buildCall({
...queryResult,
slippage,
Expand All @@ -88,8 +85,8 @@ const exit = async () => {
call,
value,
);
console.log("transaction status: " + transactionReceipt.status);
console.log("token amounts deltas per token: " + balanceDeltas);
console.log(`transaction status: ${transactionReceipt.status}`);
console.log(`token amounts deltas per token: ${balanceDeltas}`);
}

exit();
9 changes: 4 additions & 5 deletions examples/join/weighted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ const slippage = Slippage.fromPercentage('1'); // 1%
const join = async () => {
const balancerApi = new BalancerApi(balancerApiUrl, 1);
const poolState: PoolStateInput = await balancerApi.pools.fetchPoolState(poolId);
let client: Client & PublicActions & TestActions & WalletActions;
client = createTestClient({
const client: Client & PublicActions & TestActions & WalletActions = createTestClient({
mode: 'hardhat',
chain: CHAINS[chainId],
transport: http(rpcUrl),
Expand Down Expand Up @@ -76,7 +75,7 @@ const join = async () => {

const queryResult = await poolJoin.query(joinInput, poolState);

const { call, to, value, maxAmountsIn, minBptOut } =
const { call, to, value } =
poolJoin.buildCall({
...queryResult,
slippage,
Expand All @@ -92,8 +91,8 @@ const join = async () => {
call,
value,
);
console.log("transaction status: " + transactionReceipt.status);
console.log("token amounts deltas per token: " + balanceDeltas);
console.log(`transaction status: ${transactionReceipt.status}`);
console.log(`token amounts deltas per token: ${balanceDeltas}`);
}

join();

0 comments on commit 36e684f

Please sign in to comment.