Skip to content

Commit

Permalink
Merge pull request #3612 from balancer/release/1.110.0
Browse files Browse the repository at this point in the history
Release 1.110.0
  • Loading branch information
timjrobinson authored Jul 3, 2023
2 parents 4f81e82 + 7d92267 commit e8015e3
Show file tree
Hide file tree
Showing 17 changed files with 60 additions and 330 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@balancer/frontend-v2",
"version": "1.109.11",
"version": "1.110.0",
"engines": {
"node": "=16",
"npm": ">=8"
Expand Down
29 changes: 14 additions & 15 deletions src/components/_global/BalActionSteps/BalActionSteps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,9 @@ function handleSignAction(state: TransactionActionState) {
async function handleTransaction(
tx: TransactionResponse,
state: TransactionActionState,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
actionInfo: TransactionActionInfo
): Promise<void> {
// const { postActionValidation, actionInvalidReason } = actionInfo;
const { postActionValidation, actionInvalidReason } = actionInfo;
await txListener(tx, {
onTxConfirmed: async (receipt: TransactionReceipt) => {
Expand All @@ -230,21 +229,21 @@ async function handleTransaction(
state.confirming = false;
// const isValid = await postActionValidation?.();
// if (isValid || !postActionValidation) {
const confirmedAt = await getTxConfirmedAt(receipt);
state.confirmedAt = dateTimeLabelFor(confirmedAt);
state.confirmed = true;
if (currentActionIndex.value >= actions.value.length - 1) {
emit('success', { receipt, confirmedAt: state.confirmedAt });
const isValid = await postActionValidation?.();
if (isValid || !postActionValidation) {
const confirmedAt = await getTxConfirmedAt(receipt);
state.confirmedAt = dateTimeLabelFor(confirmedAt);
state.confirmed = true;
if (currentActionIndex.value >= actions.value.length - 1) {
emit('success', { receipt, confirmedAt: state.confirmedAt });
} else {
currentActionIndex.value += 1;
}
} else {
currentActionIndex.value += 1;
// post action validation failed, display reason.
if (actionInvalidReason) state.error = actionInvalidReason;
state.init = false;
}
// } else {
// // post action validation failed, display reason.
// if (actionInvalidReason) state.error = actionInvalidReason;
// state.init = false;
// }
},
onTxFailed: () => {
state.confirming = false;
Expand Down
8 changes: 5 additions & 3 deletions src/composables/approvals/useTokenApprovalActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function useTokenApprovalActions() {
/**
* COMPOSABLES
*/
const { refetchAllowances, approvalsRequired, approvalRequired, getToken } =
const { approvalsRequired, approvalRequired, getToken, injectSpenders } =
useTokens();
const { t } = useI18n();
const { getSigner } = useWeb3();
Expand Down Expand Up @@ -89,15 +89,17 @@ export default function useTokenApprovalActions() {
amountsToApprove: AmountToApprove[],
spender: string
): Promise<AmountToApprove[]> {
await refetchAllowances();
await injectSpenders([spender]);

return approvalsRequired(amountsToApprove, spender);
}

async function isApprovalValid(
amountToApprove: AmountToApprove,
spender: string
): Promise<boolean> {
await refetchAllowances();
await injectSpenders([spender]);

return !approvalRequired(
amountToApprove.address,
amountToApprove.amount,
Expand Down
4 changes: 2 additions & 2 deletions src/composables/queries/useAllowancesQuery.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ test('Returns token allowances from balancer SDK', async () => {

initMulticall(generateMulticallMock(processCall));

const allowanceContracts = ref([
const spenders = ref([
'0xBA12222222228d8Ba445958a75a0704d566BF2C8',
'0x6320cD32aA674d2898A68ec82e869385Fc5f7E2f',
'0x33A99Dcc4C85C014cf12626959111D5898bbCAbF',
]);

const { result } = mountComposable(() =>
useAllowancesQuery(tokens, allowanceContracts)
useAllowancesQuery(tokens, spenders)
);

const data = await waitForQueryData(result);
Expand Down
27 changes: 0 additions & 27 deletions src/lib/config/docker/contracts.ts

This file was deleted.

101 changes: 0 additions & 101 deletions src/lib/config/docker/index.ts

This file was deleted.

21 changes: 0 additions & 21 deletions src/lib/config/docker/tokens.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib/config/goerli/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const pools: Pools = {
AllowList: [
'0xbb372d299cc1afa14d5b8691ced1486fa0216f74000200000000000000000757', // DVT /WETH
'0x4dc5ef9b11fd462d78e197f8a98089933174b2c5000200000000000000000836', //tkn1/tkn2
'0x44c5b44fb1995449bdb1d6127b25652e793df012000200000000000000000859'
'0x44c5b44fb1995449bdb1d6127b25652e793df012000200000000000000000859',
],
},
Factories: {
Expand Down
8 changes: 1 addition & 7 deletions src/lib/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { Config } from './types';

import arbitrum from './arbitrum';
import docker from './docker';
import goerli from './goerli';
import gnosisChain from './gnosis-chain';
import mainnet from './mainnet';
import optimism from './optimism';
import polygon from './polygon';
import gnosisChain from './gnosis-chain';
import zkevm from './zkevm';
import test from './test';

// We don't import Network from sdk to avoid extra bundle size when loading app (while the SDK is not tree-shakable)
export enum Network {
Expand All @@ -31,10 +29,6 @@ const config: Record<Network | number, Config> = {
[Network.OPTIMISM]: optimism,
[Network.GNOSIS]: gnosisChain,
[Network.ZKEVM]: zkevm,
// @ts-ignore
12345: test,
// @ts-ignore
17: docker,
};

export default config;
1 change: 1 addition & 0 deletions src/lib/config/mainnet/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ const pools: Pools = {
'0xd8721e92ba0f8235b375e9ec9a7b697ec4e2d6c6000200000000000000000575', // 80BIDS-20WETH
'0x4729f67394030472e853cb61954fe784bfb36c3b000100000000000000000569', // 25WBTC-50USDC-25WETH
'0x911fc393355fe415a667893d55fff6703c57c72e000200000000000000000574', // 50ETHx-50WETH
'0x8334215586e93ee85e3f1a281eaf66e52015754d00020000000000000000057e', // 50WETH-50FIEF
],
},
Factories: {
Expand Down
1 change: 1 addition & 0 deletions src/lib/config/polygon/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ const pools: Pools = {
'0x9841438683c2efbfb28c94ec341544b94e4f6dd5000100000000000000000b8f', // WBTC/USDC/PAXG/WETH
'0x945f337307ea76fdaa2590d083423850f64e247f000100000000000000000b98', // 27wstETH-7WMATIC-25WBTC-7USDC-18stMATIC-8WETH-8DAI
'0xd7786ac3f9071ddacaf9a5b0bf443c58f8d6cf67000100000000000000000ba8', // 25MKR-25WETH-25DAI-25NEX
'0xe93a1e6fb57d2e2be40377841a6477cfe1ef55c2000100000000000000000bbb', // AGA/AGAR/WSTETH/STMATIC/USDC
'0x7f6a9b65cf1fc091b0e012c2908f0f711dfc95b5000200000000000000000bab', // 80mooMvxMVLP-20wUSDR
'0xed35f28f837e96f81240ebb82e0e3f518c7e8a2f000100000000000000000bb5', // STARV2-SuperPoolV1
'0xb49bd41ed56340674e2d2d3cfbfa9807e4e1fe27000100000000000000000bc2', // 25SUSHI-25WETH-25AAVE-25agEUR
Expand Down
Loading

1 comment on commit e8015e3

@vercel
Copy link

@vercel vercel bot commented on e8015e3 Jul 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.