-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: sync related ui alerts on pool page #3542
Merged
Merged
Changes from 29 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
7842f8a
feat: add gauge balancer helper contract
alter-eggo ef3ded6
Merge branch 'feat/cross-chain-boost' of github.com:balancer/frontend…
alter-eggo d0c328e
feat: add alerts in staking card
alter-eggo 49b3971
Merge branch 'feat/cross-chain-boost' of github.com:balancer/frontend…
alter-eggo e639c79
Merge branch 'feat/cross-chain-boost' of github.com:balancer/frontend…
alter-eggo 0e85413
Merge branch 'feat/chain-boost-sync' of github.com:balancer/frontend-…
alter-eggo 4b90db2
wip
alter-eggo 600a750
Merge branch 'feat/chain-boost-sync' of github.com:balancer/frontend-…
alter-eggo 1a88eea
feat: add check balances
alter-eggo e7ce28a
Merge branch 'feat/chain-boost-sync' of github.com:balancer/frontend-…
alter-eggo 00041dd
feat: add alerts on pool page
alter-eggo 2452d71
wip
alter-eggo f188b07
feat: add user checkpoint actions
alter-eggo 1cd936e
Merge branch 'develop' of github.com:balancer/frontend-v2 into feat/s…
alter-eggo d378ba7
Merge branch 'feat/chain-boost-sync' of github.com:balancer/frontend-…
alter-eggo ade1cbf
remove logs
alter-eggo f180546
Merge branch 'feat/chain-boost-sync' of github.com:balancer/frontend-…
alter-eggo 13e92a2
feat: add networks tooltips
alter-eggo 35f380b
feat: change sync process warning
alter-eggo 692ebb6
feat: change unstake btn style
alter-eggo e2b61e2
UI updates
pkattera 67a05d7
feat: change unsynced arr
alter-eggo 3606ddd
Merge branch 'feat/sync-pool-page' of github.com:balancer/frontend-v2…
alter-eggo eb7426a
fix: unstake btn style
alter-eggo 5e0b41e
feat: fix trigger update fn
alter-eggo 6e7d6bc
feat: open staking incentives card by default
alter-eggo ae26a96
feat: add sync tips
alter-eggo 9599038
feat: opening staking incentives card
alter-eggo 8d1acfb
feat: change texts
alter-eggo 44ce999
feat: add info message
alter-eggo 6aac572
fixes after review
alter-eggo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
87 changes: 87 additions & 0 deletions
87
src/components/contextual/pages/vebal/cross-chain-boost/CheckpointGaugeModal.vue
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,87 @@ | ||
<script setup lang="ts"> | ||
import { usePoolStaking } from '@/providers/local/pool-staking.provider'; | ||
import { useCrossChainSync } from '@/providers/cross-chain-sync.provider'; | ||
import useTransactions from '@/composables/useTransactions'; | ||
|
||
interface Props { | ||
isVisible?: boolean; | ||
} | ||
|
||
withDefaults(defineProps<Props>(), { | ||
isVisible: false, | ||
}); | ||
|
||
const emit = defineEmits(['close', 'success']); | ||
|
||
const { poolGauges } = usePoolStaking(); | ||
const { triggerGaugeUpdate } = useCrossChainSync(); | ||
const { addTransaction } = useTransactions(); | ||
|
||
const showCloseBtn = ref(false); | ||
|
||
async function triggerUpdate() { | ||
try { | ||
const id = poolGauges.value?.pool.preferentialGauge.id; | ||
if (!id) { | ||
throw new Error('No preferential gauge id'); | ||
} | ||
|
||
const tx = await triggerGaugeUpdate(id); | ||
|
||
addTransaction({ | ||
id: tx.hash, | ||
type: 'tx', | ||
action: 'userGaugeCheckpoint', | ||
summary: '', | ||
}); | ||
emit('success'); | ||
|
||
return tx; | ||
} catch (e) { | ||
console.error(e); | ||
return Promise.reject(e); | ||
} | ||
} | ||
|
||
const actions = [ | ||
{ | ||
label: 'Confirm pool gauge update', | ||
loadingLabel: 'Confirming pool gauge update', | ||
confirmingLabel: 'Confirming pool gauge update', | ||
action: async () => { | ||
return triggerUpdate(); | ||
}, | ||
stepTooltip: '', | ||
}, | ||
]; | ||
</script> | ||
|
||
<template> | ||
<BalModal | ||
:show="isVisible" | ||
title="Trigger pool gauge veBAL update" | ||
@close="emit('close')" | ||
> | ||
<div class="flex flex-col justify-between"> | ||
<span class="mb-12"> | ||
Even though you've synced new veBAL to this Layer 2, it isn’t | ||
contributing to your staking boost yet on this pool. This is because, | ||
pool gauges don't detect veBAL changes until you interact with them. | ||
This transaction is the most gas efficient way to update the gauge but | ||
you can also trigger the update by claiming any BAL incentives. | ||
</span> | ||
|
||
<BalActionSteps :actions="actions" @success="showCloseBtn = true" /> | ||
|
||
<BalBtn | ||
v-if="showCloseBtn" | ||
color="gray" | ||
outline | ||
block | ||
@click="$emit('close')" | ||
> | ||
{{ $t('close') }} | ||
</BalBtn> | ||
</div> | ||
</BalModal> | ||
</template> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't work for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed