-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
Switch from window.dispatchEvent
introduced in this PR: #357 to a proper context/state
The basic idea is that we need to query
with GET
the /v2/apr
endpoint:
- once we stake BTC (API data + local storage). Local storage -> we are not counting
verified
, but instead the ones that were signed + submitted to BTC - once we stake BABY
In both cases this is needed since back-end
is not immediately aware of user staked BTC
or BABY
window.dispatchEvent
was introduced to overcome the context issue and simplify the consumption of back-end
data for co-staking
split and calculations
The outcome of this ticket should be the same:
- once we stake
BTC
we receive the feedback in theco-staking CTA modal
after staking, with updatedA%, B%, X
- once we stake
BABY
we immediately fetch the updated data, and see theX
onbaby
route/tab - rewards also work as expected, showing the split, able to claim, etc.
This issue requires #357 to be merged first
Metadata
Metadata
Assignees
Labels
No labels