Skip to content
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: cross chain boost sync support #3377

Merged
merged 84 commits into from
Jul 6, 2023
Merged

Conversation

alter-eggo
Copy link
Collaborator

Description

See title

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency changes
  • Code refactor / cleanup
  • Documentation or wording changes
  • Other

How should this be tested?

Please provide instructions so we can test. Please also list any relevant details for your test configuration.

  • Test A
  • Test B

Visual context

Please provide any relevant visual context for UI changes or additions. This could be static screenshots or a loom screencast.

Checklist:

  • I have performed a self-review of my own code
  • I have requested at least 1 review (If the PR is significant enough, use best judgement here)
  • I have commented my code where relevant, particularly in hard-to-understand areas
  • If package-lock.json has changes, it was intentional.
  • The base of this PR is master if hotfix, develop if not

@alter-eggo alter-eggo added the Feature base For a long running branch that separates feature development from the develop branch label May 17, 2023
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 17, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 773b63b
Status: ✅  Deploy successful!
Preview URL: https://a53575b1.balancer-d6h.pages.dev
Branch Preview URL: https://feat-chain-boost-sync.balancer-d6h.pages.dev

View logs

src/lib/abi/veDelegationPoxyL2.json Outdated Show resolved Hide resolved
@agualis agualis self-requested a review June 20, 2023 06:38
}

// veBAL_balance = bias - slope * (now() - timestamp)
function calculateVeBAlBalance() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Which veBAL balance are we calculating here? Do we not do this calculation already somewhere else for the veBAL page?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it is calculation of synced veBal balance of certain network

const timestamp = votingEscrowLocks.value?.timestamp;

if (!bias || !slope || !timestamp)
return new BigNumber(0).toFixed(4).toString();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again, please use bnum.

@@ -26,5 +26,5 @@ test('Does not calculate boosts when user does not have gauge shares', async ()

const data = await waitForQueryData(result);

expect(data).toEqual({ 'test pool id': '1.00000000833325' });
expect(data).toEqual({ 'test pool id': '1.0854950634314737561' });
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did this test change? Is it now correct or was the previous value correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@agualis wonder if it was changed bc of some of your tests changes?

src/pages/vebal.vue Outdated Show resolved Hide resolved
src/providers/wallet.provider.ts Outdated Show resolved Hide resolved
src/composables/useLock.ts Outdated Show resolved Hide resolved
src/providers/cross-chain-sync.provider.ts Outdated Show resolved Hide resolved
}

let disposeRefetchOnInterval: NodeJS.Timeout;
function refetchOnInterval() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it's better not to use hooks in functions?

* feat: add gauge balancer helper contract

* feat: add alerts in staking card

* wip

* feat: add check balances

* feat: add alerts on pool page

* wip

* feat: add user checkpoint actions

* remove logs

* feat: add networks tooltips

* feat: change sync process warning

* feat: change unstake btn style

* UI updates

* feat: change unsynced arr

* fix: unstake btn style

* feat: fix trigger update fn

* feat: open staking incentives card by default

* feat: add sync tips

* feat: opening staking incentives card

* feat: change texts

* feat: add info message

* fixes after review

---------

Co-authored-by: pkattera <[email protected]>
* chore: Update wording

* chore: Update wording
* feat: add layer zero tx links

* feat: add timeout on l0 tx hashes set

* feat: hide text if no l0 link

* feat: remove test code

* feat: add padding if no link

* feat: implement fetch l0 messages on interval
setSyncTxHashes(network, tx.hash);
},
onTxFailed: () => {
//
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should display an error message in this case, right? Could you check what is done in the join/exit flows here and see what we might need to add.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not sure if we need to add smth here. error message is handled in BalActionSteps component and in other flows here confirming field in state is set to false. e.g

@garethfuller garethfuller merged commit 3eeb059 into develop Jul 6, 2023
4 checks passed
@garethfuller garethfuller deleted the feat/chain-boost-sync branch July 6, 2023 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature base For a long running branch that separates feature development from the develop branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants