-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FOLLOW-244: Refresh neuron from NeuronDetail page (#5697)
# Motivation Increasing a neurons' stake is a 2 step process: 1. Transfer ICP to the neuron's account. 2. Notify the governance canister to refresh the neurons. Because this process can be interrupted after step 1, we need to be able to finish a half completed process. Currently the nns-dapp canister has a list of neuron accounts for each user and it watches every ICP ledger transaction to see if it is to a neuron account and then it refreshes that neuron. We want to stop keeping this list in the nns-dapp canister and we want to stop watching every transaction. So instead we will check from the frontend if a neuron's stake matches its account's balance and refresh if needed. In this PR we call the service added in #5696 from the `NnsNeuronDetail` component. # Changes 1. Call `refreshNeuronIfNeeded` from `NnsNeuronDetail` once the neuron is loaded. # Tests 1. Add missing `queryNeuron` and `claimOrRefreshNeuron` to fake governance API. 2. Add unit tests. 3. Manually tested after removing the corresponding logic from the canister. # Todos - [x] Add entry to changelog (if necessary).
- Loading branch information
Showing
5 changed files
with
104 additions
and
6 deletions.
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