File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
features/adjustment/mint/mint-form-context Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,7 @@ export const MintFormProvider: FC<{ children: ReactNode }> = ({ children }) => {
6565
6666 const mintData = useMemo ( ( ) => {
6767 const mintableStETH = activeVault ?. mintableStETH ?? 0n ;
68- const mintableWstETH =
69- ( activeVault ?. shareLimit ?? 0n ) - ( activeVault ?. liabilityShares ?? 0n ) ;
68+ const mintableWstETH = activeVault ?. mintableShares ?? 0n ;
7069
7170 return { mintableStETH, mintableWstETH } ;
7271 } , [ activeVault ] ) ;
Original file line number Diff line number Diff line change @@ -68,11 +68,11 @@ const getVaultData = async ({
6868 dashboardContract . read . getConfirmExpiry ( ) ,
6969 ] ) ;
7070
71+ const mintableShares = bigIntMax ( totalMintingCapacity - liabilityShares , 0n ) ;
72+
7173 const [ liabilityStETH , mintableStETH , stETHLimit ] = await Promise . all ( [
7274 shares . convertToSteth ( liabilityShares ) ,
73- shares . convertToSteth (
74- bigIntMax ( totalMintingCapacity - liabilityShares , 0n ) ,
75- ) ,
75+ shares . convertToSteth ( mintableShares ) ,
7676 shares . convertToSteth ( shareLimit ) ,
7777 ] ) ;
7878
@@ -91,6 +91,7 @@ const getVaultData = async ({
9191 totalValue,
9292 liabilityStETH,
9393 mintableStETH,
94+ mintableShares,
9495 stETHLimit,
9596 apr : null ,
9697 healthScore : healthScore . healthRatio ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export interface VaultInfo extends VaultSocket {
1111 totalValue : bigint ;
1212 liabilityStETH : bigint ;
1313 mintableStETH : bigint ;
14+ mintableShares : bigint ;
1415 stETHLimit : bigint ;
1516 apr : null ;
1617 healthScore : number ;
You can’t perform that action at this time.
0 commit comments