From ada7e4302165584e85c3587b656447009425d1d8 Mon Sep 17 00:00:00 2001 From: Oz Date: Tue, 24 Nov 2020 12:33:52 +0600 Subject: [PATCH 1/2] manage fee in % --- apps/lido/app/src/App.js | 9 +- .../app/src/components/ChangeFeeSidePanel.js | 144 +++++++++--------- apps/lido/app/src/index.js | 5 +- deployed.json | 7 +- 4 files changed, 92 insertions(+), 73 deletions(-) diff --git a/apps/lido/app/src/App.js b/apps/lido/app/src/App.js index 1f710aba9..f92f6d93b 100644 --- a/apps/lido/app/src/App.js +++ b/apps/lido/app/src/App.js @@ -33,7 +33,7 @@ export default function App() { const closeChangeFeePanel = () => setChangeFeePanelOpened(false) const apiSetFee = useCallback( (newFee) => { - return api.setFee(newFee) + return api.setFee(newFee).toPromise() }, [api] ) @@ -146,7 +146,7 @@ export default function App() { label: 'Fee', content: ( - {fee || 'No data'} + {fee ? fee / 100 : 'No data'} - + {({ submitForm, isSubmitting, isValidating }) => { + return ( +
{ + e.preventDefault() + submitForm() + }} + > + + This action will change the fee rate. + + + + + ) + }} + ) } diff --git a/apps/lido/app/src/index.js b/apps/lido/app/src/index.js index 98302c74d..9e791ade0 100644 --- a/apps/lido/app/src/index.js +++ b/apps/lido/app/src/index.js @@ -25,7 +25,10 @@ const defaultState = { operators: defaultValue, treasury: defaultValue, insuranceFund: defaultValue, - beaconStat: defaultValue, + beaconStat: { + depositedValidators: defaultValue, + beaconBalance: defaultValue, + }, isSyncing: true, } diff --git a/deployed.json b/deployed.json index edeb33320..b99d4d8f3 100644 --- a/deployed.json +++ b/deployed.json @@ -151,7 +151,12 @@ "voteDuration": 180, "votingSupportRequired": "500000000000000000", "votingMinAcceptanceQuorum": "50000000000000000", - "depositIterationLimit": 16 + "beaconSpec": { + "epochsPerFrame": 225, + "slotsPerEpoch": 32, + "secondsPerSlot": 12, + "genesisTime": 1606824000 + } }, "aragonEnsLabelName": "aragonpm", "ensAddress": "0x5f6F7E8cc7346a11ca2dEf8f827b7a0b612c56a1", From e40a17b747425e63d09aa5be6b9b6313b178f4d8 Mon Sep 17 00:00:00 2001 From: Oz Date: Tue, 24 Nov 2020 12:35:43 +0600 Subject: [PATCH 2/2] add percent sign --- apps/lido/app/src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/lido/app/src/App.js b/apps/lido/app/src/App.js index f92f6d93b..80a7a2b89 100644 --- a/apps/lido/app/src/App.js +++ b/apps/lido/app/src/App.js @@ -146,7 +146,7 @@ export default function App() { label: 'Fee', content: ( - {fee ? fee / 100 : 'No data'} + {fee ? `${fee / 100}%` : 'No data'}