Skip to content

Commit 7e15a29

Browse files
authored
Merge pull request #38 from lidofinance/fix/create-vault
Common role map
2 parents 3149dc9 + bc5a129 commit 7e15a29

File tree

32 files changed

+338
-648
lines changed

32 files changed

+338
-648
lines changed

consts/roles.ts

Lines changed: 0 additions & 193 deletions
This file was deleted.

features/adjustment/repay/form/submit-button/submit-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const SubmitButton = () => {
99

1010
return (
1111
<PermissionedSubmitButton
12-
dashboardRole="burner"
12+
dashboardRole="repayer"
1313
type="submit"
1414
disabled={disabled}
1515
>

features/create-vault/consts.ts

Lines changed: 1 addition & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MainSettingsEntryType, PermissionsRoles } from './types';
1+
import { MainSettingsEntryType } from './types';
22

33
export const CREATE_VAULT_STEPS = 2;
44

@@ -73,147 +73,6 @@ export const MAIN_SETTINGS: MainSettingsEntryType[] = [
7373
},
7474
];
7575

76-
export const VAULT_MANAGER_PERMISSIONS_LIST: PermissionsRoles[] = [
77-
{
78-
role: 'funder',
79-
title: 'Mint ETH',
80-
tooltip: 'Allows Funding ETH',
81-
},
82-
{
83-
role: 'withdrawer',
84-
title: 'Repay ETH',
85-
tooltip: 'Allows Withdrawing unlocked ETH from stVault',
86-
},
87-
{
88-
role: 'minter',
89-
title: 'Mint stETH',
90-
tooltip: 'Allows Minting stETH (considering ReserveRatio)',
91-
},
92-
{
93-
role: 'burner',
94-
title: 'Burn stETH',
95-
tooltip: 'Allows Burning stETH',
96-
},
97-
{
98-
role: 'depositsPauser',
99-
title: 'Pause Deposits to Validators',
100-
tooltip:
101-
'Allows requesting the Node Operator to pause deposits to Validators to keep available ETH on the Vault balance.',
102-
},
103-
{
104-
role: 'depositsResumer',
105-
title: 'Resume Deposits to Validators',
106-
tooltip:
107-
'Allows informing the Node Operator that deposits to Validators can be resumed.',
108-
},
109-
110-
{
111-
role: 'validatorWithdrawalTrigger',
112-
title: 'Force Withdrawals ETH from Validator',
113-
tooltip:
114-
'Allows forced withdrawing ETH from validator and returning it to Vault balance.',
115-
},
116-
{
117-
role: 'validatorExitRequester',
118-
title: 'Request Node Operator to Exit Validator',
119-
tooltip:
120-
'Allows creating a request for Node Operator to exit a validator and return all ETH from this validator to the Vault balance.',
121-
},
122-
{
123-
role: 'rebalancer',
124-
title: 'Re-balance unhealthy Vault',
125-
tooltip: 'Allows rebalancing stVault if Health rate < 100%.',
126-
},
127-
{
128-
role: 'volunataryDisconnecter',
129-
title: 'Voluntary disconnect Vault from Lido Vault Hub',
130-
tooltip: 'Allows voluntary disconnecting stVault from the Lido Vault Hub.',
131-
},
132-
{
133-
role: 'assetRecoverer',
134-
title: 'Recover tokens from Dashboard contract',
135-
tooltip: 'Allows to recover ERC20 & NFTs from the Dashboard contract.',
136-
},
137-
{
138-
role: 'depositorSetter',
139-
title: 'Set vault depositorin unconnected vault',
140-
tooltip:
141-
'Allows to change the vault depositor when not connected to Lido Vault Hub.',
142-
},
143-
{
144-
role: 'lockResetter',
145-
title: 'Reset lock amount in unconnected vault',
146-
tooltip:
147-
'Allows to reset lock amount when not connected to Lido Vault Hub.',
148-
},
149-
150-
{
151-
role: 'locker',
152-
title: 'Increase lock amount in unconnected vault',
153-
tooltip:
154-
'Allows to increase lock amount when not connected to Lido Vault Hub.',
155-
},
156-
157-
{
158-
role: 'ossifyer',
159-
title: 'Ossify vault',
160-
tooltip:
161-
'Allows to ossify vault implementation when not connected to Lido Vault Hub. Prevents changes to the vault.',
162-
},
163-
164-
{
165-
role: 'pdgCompensater',
166-
title: 'Compensate disproven validator in PDG',
167-
tooltip:
168-
'Allows to return predeposted ETH from validator if it was proven invalid in PDG',
169-
},
170-
171-
{
172-
role: 'pdgProver',
173-
title: 'Prove unknown validator in PDG',
174-
tooltip: 'Allows to prove validators with correct credentials to PDG ',
175-
},
176-
177-
{
178-
role: 'unguaranteedDepositor',
179-
title: 'Perform unguaranteed deposit to beacon chain',
180-
tooltip:
181-
'Allows to withdraw vault funds and perform unguaranteed deposit to beacon chain',
182-
},
183-
184-
{
185-
role: 'tierChangeRequester',
186-
title: 'Request tier change in Operator Grid',
187-
tooltip: 'Allows to request tier change in Operator Grid',
188-
},
189-
190-
{
191-
role: 'vaultHubAuthorizer',
192-
title: 'Authorize Lido VaultHub to the vault',
193-
tooltip: 'Allows to authorize Lido VaultHub to the vault',
194-
},
195-
{
196-
role: 'vaultHubDeathorizer',
197-
title: 'Deauthorize Lido VaultHub to the vault',
198-
tooltip: 'Allows to deauthorize Lido VaultHub to the vault',
199-
},
200-
];
201-
202-
export const NO_MANAGER_PERMISSION_LIST: PermissionsRoles[] = [
203-
{
204-
role: 'nodeOperatorFeeClaimer',
205-
title: 'ClaimPage Node Operator’s Accumulated Fees',
206-
tooltip:
207-
'Allows claiming accumulated Node Operator’s fee. Claimer provides an address to receive fees.',
208-
},
209-
{
210-
role: 'nodeOperatorRewardsAdjuster',
211-
title: 'Adjust Node Operator’s Rewards',
212-
tooltip:
213-
'Allows to adjust accrued rewards(due to side deposits or consolidations) to decrease claimable fee',
214-
},
215-
];
216-
21776
export enum CREATE_VAULT_FORM_STEPS {
21877
main,
21978
confirm,

features/create-vault/create-vault-form/confirmation/confirmation-action/confirmation-action.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { useCreateVaultFormData } from 'features/create-vault/create-vault-form/
44
import { Button } from '@lidofinance/lido-ui';
55
import { Container } from './styles';
66
import { useFormContext } from 'react-hook-form';
7-
import { CREATE_VAULT_FORM_STEPS } from '../../../consts';
7+
8+
import { CREATE_VAULT_FORM_STEPS } from 'features/create-vault/consts';
89

910
export const ConfirmationAction: FC = () => {
1011
const { handleSetStep } = useCreateVaultFormData();

features/create-vault/create-vault-form/confirmation/confirmation.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ import { ConfirmationAction } from 'features/create-vault/create-vault-form/conf
44
import { ConfirmationVaultInfo } from 'features/create-vault/create-vault-form/confirmation/confirmation-vault-info';
55
import { SectionContainer } from 'features/create-vault/styles';
66

7+
import { ConfirmationVaultInfoProps } from './confirmation-vault-info/confirmation-vault-info';
78
import {
8-
CREATE_VAULT_FORM_STEPS,
9-
MAIN_SETTINGS,
109
NO_MANAGER_PERMISSION_LIST,
1110
VAULT_MANAGER_PERMISSIONS_LIST,
12-
} from '../../consts';
13-
14-
import { ConfirmationVaultInfoProps } from './confirmation-vault-info/confirmation-vault-info';
11+
} from 'modules/vaults';
12+
import {
13+
CREATE_VAULT_FORM_STEPS,
14+
MAIN_SETTINGS,
15+
} from 'features/create-vault/consts';
1516

1617
const confirmationList: ConfirmationVaultInfoProps[] = [
1718
{

0 commit comments

Comments
 (0)