Skip to content

Commit 1b3b039

Browse files
agualisgarethfullertimjrobinsonAutomated Version Bumpgithub-actions[bot]
authored
Release/1.123.0 (#4188)
* Add missing avax logo (#4157) Co-authored-by: Tim Robinson <[email protected]> * Bump vue (#4167) * Bump vue * Fix compex extended type in props * fix: use prop in prefetch links (#4168) * hotfix: Remove create pool popup (dm) (#4170) * Add missing avax logo (#4155) * 1.122.1 * chore: Add ECLP-wstETH-rETH pool to ethereum allowlist (#4159) Co-authored-by: balopco <[email protected]> * 1.122.2 * chore: Add 50WETH-50cbXEN pool to base allowlist (#4151) Co-authored-by: balopco <[email protected]> Co-authored-by: ZeKraken <[email protected]> * 1.122.3 * chore: Add B-50wstETH-50NEXT pool to gnosis-chain allowlist (#4163) Co-authored-by: balopco <[email protected]> * 1.122.4 * chore: Remove intro modal from create pool --------- Co-authored-by: Tim Robinson <[email protected]> Co-authored-by: Automated Version Bump <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: balopco <[email protected]> Co-authored-by: ZeKraken <[email protected]> * hotfix: update bal address (dm) (#4182) * Add missing avax logo (#4155) * 1.122.1 * chore: Add ECLP-wstETH-rETH pool to ethereum allowlist (#4159) Co-authored-by: balopco <[email protected]> * 1.122.2 * chore: Add 50WETH-50cbXEN pool to base allowlist (#4151) Co-authored-by: balopco <[email protected]> Co-authored-by: ZeKraken <[email protected]> * 1.122.3 * chore: Add B-50wstETH-50NEXT pool to gnosis-chain allowlist (#4163) Co-authored-by: balopco <[email protected]> * 1.122.4 * chore: Remove intro modal from create pool (#4169) * 1.122.5 * chore: Add B-50USD-50bIB01 pool to gnosis-chain allowlist (#4171) Co-authored-by: balopco <[email protected]> * 1.122.6 * chore: Add B-50USD-50bCSPX pool to gnosis-chain allowlist (#4173) Co-authored-by: balopco <[email protected]> Co-authored-by: ZeKraken <[email protected]> * 1.122.7 * chore: Add B-50USD-50bIBTA pool to gnosis-chain allowlist (#4174) Co-authored-by: balopco <[email protected]> Co-authored-by: ZeKraken <[email protected]> * 1.122.8 * chore: Add 50GOLD/25WETH/25USDC pool to base allowlist (#4176) Co-authored-by: balopco <[email protected]> * 1.122.9 * chore: Add USDC/USDbC/axlUSDC pool to base allowlist (#4175) Co-authored-by: balopco <[email protected]> * 1.122.10 * chore: Add GOLD/BAL/USDC pool to base allowlist (#4177) Co-authored-by: balopco <[email protected]> Co-authored-by: ZeKraken <[email protected]> * 1.122.11 * weekly gauge add (#4178) * 1.122.12 * add 3pool to stakable (#4179) * 1.122.13 * chore: Update BAL address --------- Co-authored-by: Tim Robinson <[email protected]> Co-authored-by: Automated Version Bump <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: balopco <[email protected]> Co-authored-by: ZeKraken <[email protected]> * feat: add improvements on portfolio page (#3700) * feat: add staked pools gauges request * feat: add check working balance for staked pools * feat: add pools table selector * feat: add checkpointer contract * feat: add poke all gauges modal * feat: add checkpoint logic on portfolio page * feat: add proper checkpoint 1 gauge flow * feat: add actions for unstaked pools table * fix: review * fix: test * feat: add action enum * feat: fix problem with tables * fix: styles * fix: align of actions column * fix: remove overflow hidden * feat: add isKilled in user gauges query * fix: tests * feat: hide actions for deprecated pools * feat: remove actions if pool deprecated * 1.123.0 --------- Co-authored-by: Gareth Fuller <[email protected]> Co-authored-by: Tim Robinson <[email protected]> Co-authored-by: Tim Robinson <[email protected]> Co-authored-by: Automated Version Bump <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: balopco <[email protected]> Co-authored-by: ZeKraken <[email protected]> Co-authored-by: Anastasios <[email protected]>
1 parent 97be9fa commit 1b3b039

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1859
-214
lines changed

package-lock.json

Lines changed: 173 additions & 161 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@balancer/frontend-v2",
3-
"version": "1.122.19",
3+
"version": "1.123.0",
44
"engines": {
55
"node": "=16",
66
"npm": ">=8"
@@ -154,7 +154,7 @@
154154
"vite-plugin-sentry": "^1.1.6",
155155
"vitest": "^0.31.4",
156156
"vitest-mock-extended": "^1.1.0",
157-
"vue": "3.2.45",
157+
"vue": "^3.3.4",
158158
"vue-echarts": "^6.0.0",
159159
"vue-i18n": "^9.2.2",
160160
"vue-loader": "^17.0.1",

src/assets/data/contracts/arbitrum.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"ChildChainGaugeRewardHelper": "0xA0DAbEBAAd1b243BBb243f933013d560819eB66f",
1414
"ChildChainGaugeWorkingBalanceHelper": "0xEa924b45a3fcDAAdf4E5cFB1665823B8F8F2039B",
1515
"ChildChainGaugeTokenAdder": "0xbfD9769b061E57e478690299011A028194D66e3C",
16+
"ChildChainGaugeCheckpointer": "0x96484f2abf5e58b15176dbf1a799627b53f13b6d",
1617
"ChildChainLiquidityGaugeFactory": "0xb08E16cFc07C684dAA2f93C70323BAdb2A6CBFd2",
1718
"ChildChainStreamer": "0xD7FAD3bd59D6477cbe1BE7f646F7f1BA25b230f8",
1819
"CircuitBreakerLib": "0xDF9B5B00Ef9bca66e9902Bd813dB14e4343Be025",

src/assets/data/contracts/gnosis.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"ChildChainGaugeRewardHelper": "0xf7D5DcE55E6D47852F054697BAB6A1B48A00ddbd",
1414
"ChildChainGaugeWorkingBalanceHelper": "0x682f0dDBFd41D1272982f64a499Fb62d80e27589",
1515
"ChildChainGaugeTokenAdder": "0x1802953277FD955f9a254B80Aa0582f193cF1d77",
16+
"ChildChainGaugeCheckpointer": "0x1702067424096f07a60e62ccee3de9420068492d",
1617
"ChildChainLiquidityGaugeFactory": "0x809B79b53F18E9bc08A961ED4678B901aC93213a",
1718
"ChildChainStreamer": "0x230a59F4d9ADc147480f03B0D3fFfeCd56c3289a",
1819
"CircuitBreakerLib": "0x54f8F9d28e26Fa5864cfA80f50A5Df95fD85f46a",

src/assets/data/contracts/polygon.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"ChildChainGaugeWorkingBalanceHelper": "0x08fd003D8F1892D4EC684E6C3EE0128081be461b",
1515
"ChildChainGaugeTokenAdder": "0x1554ee754707D5C93b7934AF404747Aba521Aaf2",
1616
"ChildChainLiquidityGaugeFactory": "0x3b8cA519122CdD8efb272b0D3085453404B25bD0",
17+
"ChildChainGaugeCheckpointer": "0x268e2ee1413d768b6e2dc3f5a4ddc9ae03d9af42",
1718
"ChildChainStreamer": "0x6f5a2eE11E7a772AeB5114A20d0D7c0ff61EB8A0",
1819
"CircuitBreakerLib": "0xEDFd0A7005A7c72c44Ff13bEa370c86A9D11beE1",
1920
"ComposableStablePoolFactory": "0x6Ab5549bBd766A43aFb687776ad8466F8b42f777",
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 13 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading

src/components/_global/BalRangeInput/BalRangeInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import VueSlider, { DefineComponent as TVueSlider } from 'vue-slider-component';
88
import tailwindConfig from 'tailwind.config.js';
99
import useDarkMode from '@/composables/useDarkMode';
1010
11-
export interface BalRangeInputProps extends TVueSlider {
11+
export interface BalRangeInputProps extends /* @vue-ignore */ TVueSlider {
1212
modelValue: number;
1313
leftLabel?: string;
1414
rightLabel?: string;

src/components/_global/BalTable/BalTable.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,12 @@ watch([() => props.data, () => props.isLoading], ([newData]) => {
218218
<template>
219219
<div
220220
:class="[
221-
'max-w-full whitespace-nowrap overflow-hidden',
221+
'max-w-full whitespace-nowrap',
222+
'max-lg:overflow-hidden',
222223
{ 'rounded-lg': !square },
223224
]"
224225
>
225-
<div ref="headerRef" class="overflow-hidden">
226+
<div ref="headerRef" class="max-lg:overflow-hidden">
226227
<table class="w-full whitespace-normal table-fixed">
227228
<!-- header width handled by colgroup -->
228229
<colgroup>
@@ -253,6 +254,7 @@ watch([() => props.data, () => props.isLoading], ([newData]) => {
253254
currentSortColumn === column.id && currentSortDirection
254255
? 'text-blue-600 hover:text-blue-500 focus:text-purple-600 dark:text-blue-400 dark:hover:text-blue-600 dark:focus:text-blue-600 transition-colors'
255256
: '',
257+
!square ? 'rounded-t-lg' : '',
256258
]"
257259
@click="handleSort(column.id)"
258260
>
@@ -290,7 +292,7 @@ watch([() => props.data, () => props.isLoading], ([newData]) => {
290292
</thead>
291293
</table>
292294
</div>
293-
<div ref="bodyRef" class="overflow-auto">
295+
<div ref="bodyRef" class="max-lg:overflow-auto">
294296
<BalLoadingBlock
295297
v-if="isLoading"
296298
:class="[skeletonClass, 'min-w-full']"

src/components/contextual/pages/pool/staking/StakingIncentivesCard.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ function handlePreviewClose() {
181181
</BalStack>
182182
<StakingCardSyncAlert
183183
v-if="networkId !== Network.MAINNET"
184+
:poolAddress="pool.address"
185+
:poolId="pool.id"
184186
:fiatValueOfStakedShares="fiatValueOfStakedShares"
185187
:fiatValueOfUnstakedShares="fiatValueOfUnstakedShares"
186188
@should-staking-card-be-opened="isOpenedByDefault = true"

src/components/contextual/pages/pools/StakedPoolsTable.vue

Lines changed: 118 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,31 @@ import ProceedToSyncModal from '@/components/contextual/pages/vebal/cross-chain-
1212
import { providePoolStaking } from '@/providers/local/pool-staking.provider';
1313
1414
import PortfolioSyncTip from '../vebal/cross-chain-boost/PortfolioSyncTip.vue';
15+
import { useCrossChainSync } from '@/providers/cross-chain-sync.provider';
1516
17+
import CheckpointGaugeModal from '../vebal/cross-chain-boost/CheckpointGaugeModal.vue';
18+
import CheckpointAllGaugesModal from '../vebal/cross-chain-boost/CheckpointAllGaugesModal.vue';
19+
import { PoolAction } from './types';
1620
/**
1721
* STATE
1822
*/
1923
const showUnstakeModal = ref(false);
2024
const poolToUnstake = ref<Pool | undefined>();
25+
26+
const showRestakeModal = ref(false);
27+
const poolToRestake = ref<Pool | undefined>();
28+
2129
const showProceedModal = ref(false);
30+
const defaultPoolActions = [
31+
PoolAction.Unstake,
32+
PoolAction.Add,
33+
PoolAction.Vote,
34+
];
35+
36+
const showPokeAllGaugesModal = ref(false);
37+
38+
const poolToCheckpoint = ref<Pool | undefined>();
39+
const showCheckpointModal = ref(false);
2240
2341
/**
2442
* PROVIDERS
@@ -28,8 +46,15 @@ providePoolStaking();
2846
/**
2947
* COMPOSABLES
3048
*/
31-
const { stakedPools, poolBoostsMap, stakedShares, isLoading } =
32-
useUserStaking();
49+
const {
50+
stakedPools,
51+
poolBoostsMap,
52+
stakedShares,
53+
isLoading,
54+
hasNonPrefGaugesPoolsAddresses,
55+
userGaugeShares,
56+
} = useUserStaking();
57+
const { shouldPokeGauge } = useCrossChainSync();
3358
3459
const { refetchAllUserPools } = useUserPools();
3560
const { isWalletReady, isWalletConnecting } = useWeb3();
@@ -62,14 +87,66 @@ function handleUnstake(pool: Pool) {
6287
poolToUnstake.value = pool;
6388
}
6489
90+
function handleRestake(pool: Pool) {
91+
showRestakeModal.value = true;
92+
poolToRestake.value = pool;
93+
}
94+
6595
function handleModalClose() {
6696
refetchAllUserPools();
6797
showUnstakeModal.value = false;
98+
showRestakeModal.value = false;
99+
}
100+
101+
function handleCheckpoint(pool: Pool) {
102+
showCheckpointModal.value = true;
103+
poolToCheckpoint.value = pool;
68104
}
69105
70106
async function handleUnstakeSuccess() {
71107
await refetchAllUserPools();
72108
}
109+
110+
// map of pool ids and pref gauges that should be poked
111+
const shouldPokePoolsMap = ref<Record<string, string>>({});
112+
113+
function removePoolFromPokeMap(poolAddress: string) {
114+
Reflect.deleteProperty(shouldPokePoolsMap.value, poolAddress);
115+
}
116+
117+
function resetShouldPokePoolsMap() {
118+
shouldPokePoolsMap.value = {};
119+
}
120+
121+
function onSuccessCheckpoint(poolAddress: string) {
122+
showCheckpointModal.value = false;
123+
poolToCheckpoint.value = undefined;
124+
removePoolFromPokeMap(poolAddress);
125+
}
126+
127+
watch(
128+
() => userGaugeShares.value,
129+
async val => {
130+
if (!val) return;
131+
for (const gauge of val) {
132+
try {
133+
const id = gauge?.gauge.id;
134+
135+
if (!id) {
136+
throw new Error('No gauge id');
137+
}
138+
139+
const shouldPoke = await shouldPokeGauge(id);
140+
if (shouldPoke) {
141+
shouldPokePoolsMap.value[gauge.gauge.poolAddress] = id;
142+
}
143+
} catch (e) {
144+
console.log(e);
145+
}
146+
}
147+
},
148+
{ immediate: true, deep: true }
149+
);
73150
</script>
74151

75152
<template>
@@ -78,7 +155,11 @@ async function handleUnstakeSuccess() {
78155
<h5 class="px-4 xl:px-0">
79156
{{ $t('staking.stakedPools') }}
80157
</h5>
81-
<PortfolioSyncTip @show-proceed-modal="showProceedModal = true" />
158+
<PortfolioSyncTip
159+
:shouldPokePoolsMap="shouldPokePoolsMap"
160+
@show-proceed-modal="showProceedModal = true"
161+
@show-poke-all-gauge-modal="showPokeAllGaugesModal = true"
162+
/>
82163
<PoolsTable
83164
:key="poolsToRenderKey"
84165
:data="stakedPools"
@@ -91,10 +172,19 @@ async function handleUnstakeSuccess() {
91172
:isLoading="isWalletReady && isLoading"
92173
showPoolShares
93174
showActions
175+
showStakeActions
94176
:showBoost="isPoolBoostsEnabled"
177+
:defaultPoolActions="defaultPoolActions"
178+
:shouldPokePoolsMap="shouldPokePoolsMap"
179+
:hasNonPrefGaugesPoolsAddresses="hasNonPrefGaugesPoolsAddresses"
95180
@trigger-unstake="handleUnstake"
181+
@trigger-restake="handleRestake"
182+
@trigger-vote="showProceedModal = true"
183+
@trigger-checkpoint="handleCheckpoint"
96184
/>
97185
</BalStack>
186+
187+
<!-- Unstake modal -->
98188
<StakePreviewModal
99189
v-if="poolToUnstake"
100190
:pool="poolToUnstake"
@@ -103,9 +193,34 @@ async function handleUnstakeSuccess() {
103193
@close="handleModalClose"
104194
@success="handleUnstakeSuccess"
105195
/>
196+
197+
<!-- Restake modal -->
198+
<StakePreviewModal
199+
v-if="poolToRestake"
200+
:pool="poolToRestake"
201+
:isVisible="showRestakeModal"
202+
action="restake"
203+
@close="handleModalClose"
204+
@success="handleUnstakeSuccess"
205+
/>
206+
106207
<ProceedToSyncModal
107208
:isVisible="showProceedModal"
108209
@close="showProceedModal = false"
109210
/>
211+
212+
<CheckpointAllGaugesModal
213+
:shouldPokePoolsMap="shouldPokePoolsMap"
214+
:isVisible="showPokeAllGaugesModal"
215+
@close="showPokeAllGaugesModal = false"
216+
@success="resetShouldPokePoolsMap"
217+
/>
218+
219+
<CheckpointGaugeModal
220+
:poolAddress="poolToCheckpoint?.address"
221+
:isVisible="showCheckpointModal"
222+
@close="showCheckpointModal = false"
223+
@success="onSuccessCheckpoint"
224+
/>
110225
</div>
111226
</template>

0 commit comments

Comments
 (0)