Skip to content

Commit

Permalink
fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
alter-eggo committed Jun 30, 2023
1 parent 44ce999 commit 6aac572
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
import { usePoolStaking } from '@/providers/local/pool-staking.provider';
import CheckpointGaugeModal from './CheckpointGaugeModal.vue';
import useWeb3 from '@/services/web3/useWeb3';
import config from '@/lib/config';
type Props = {
fiatValueOfStakedShares: string;
Expand All @@ -30,8 +31,9 @@ const tipText = computed(() => {
if (
networksSyncState.value[networkId.value] === NetworkSyncState.Unsynced
) {
text =
'After your veBAL syncs to [Arbitrum], restake to move from the deprecated pool gauge to the new boost-aware pool gauge. If you restake before the veBAL syncs, you’ll need to perform another interaction on the gauge to start receiving your staking boost.';
text = `After your veBAL syncs to ${
config[networkId.value].chainName
}, restake to move from the deprecated pool gauge to the new boost-aware pool gauge. If you restake before the veBAL syncs, you’ll need to perform another interaction on the gauge to start receiving your staking boost.`;
}
if (networksSyncState.value[networkId.value] === NetworkSyncState.Synced) {
Expand Down Expand Up @@ -69,20 +71,21 @@ async function setWarningAlertState() {
}
try {
emit('shouldStakingCardBeOpened');
const balance = await getGaugeWorkingBalance(id);
// if the second number it returns is greater than the first, then show the message
if (balance[1]?.gt(balance[0])) {
shouldShowWarningAlert.value = true;
emit('shouldStakingCardBeOpened');
}
} catch (error) {
console.log(error);
}
}
onBeforeMount(() => {
void setWarningAlertState();
onMounted(() => {
setWarningAlertState();
});
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/locales/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
"syncNetworkAction": {
"title": "This will sync your veBAL balance and give you a staking boost across the networks listed below."
},
"syncInProgress": "A sync operation is currently in progress. Wait until it completes before restaking any of your positions on [Arbitrum] to get your maximum veBAL boost."
"syncInProgress": "A sync operation is currently in progress. Wait until it completes before restaking any of your positions on {network} to get your maximum veBAL boost."
},
"migratePool": {
"aaveBoostedPool": {
Expand Down
17 changes: 7 additions & 10 deletions src/providers/cross-chain-sync.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,27 +293,24 @@ export const crossChainSyncProvider = () => {
const workingBalanceHelperContract = new GaugeWorkingBalanceHelper(
contractAddress
);
const balances =
await workingBalanceHelperContract.getWorkingBalanceToSupplyRatios({
signer,
userAddress: account.value,
gauge: gaugeAddress,
});

return balances;
return workingBalanceHelperContract.getWorkingBalanceToSupplyRatios({
signer,
userAddress: account.value,
gauge: gaugeAddress,
});
}

// checkpoint
async function triggerGaugeUpdate(gaugeAddress: string) {
const gaugeContract = new LiquidityGauge(gaugeAddress);

const signer = getSigner();
const tx = await gaugeContract.checkpointUser({

return gaugeContract.checkpointUser({
signer,
userAddress: account.value,
});

return tx;
}

watch(
Expand Down

0 comments on commit 6aac572

Please sign in to comment.