@huma-finance/widgets 0.0.77-beta.1008 → 0.0.77-beta.1010
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -183021,7 +183021,9 @@ function SolanaLendWithdraw({
|
|
|
183021
183021
|
new LoggingContextHelper(Vr).logAction("StartFlow", {}), pr(setLoggingContext(Vr)), pr(setStep(WIDGET_STEP.ConfirmTransfer));
|
|
183022
183022
|
}
|
|
183023
183023
|
}, [pr, ar.chainId, ar.poolName, ar.poolType, hr]), useEffect(() => {
|
|
183024
|
-
const Vr = fr === "senior" ? or.seniorTrancheAssets : or.juniorTrancheAssets, Yr = new BN$1(Vr ?? 1), Dr = new BN$1(
|
|
183024
|
+
const Vr = fr === "senior" ? or.seniorTrancheAssets : or.juniorTrancheAssets, Yr = new BN$1(Vr ?? 1), Dr = new BN$1(
|
|
183025
|
+
cr.supply.toString()
|
|
183026
|
+
).isZero() ? new BN$1(1) : new BN$1(cr.supply.toString()), br = Yr.muln(1e5).div(Dr).toNumber() / 1e5;
|
|
183025
183027
|
Cr(br);
|
|
183026
183028
|
}, [
|
|
183027
183029
|
or.juniorTrancheAssets,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huma-finance/widgets",
|
|
3
|
-
"version": "0.0.77-beta.
|
|
3
|
+
"version": "0.0.77-beta.1010+cad23bb",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"@ethersproject/contracts": "^5.7.0",
|
|
23
23
|
"@ethersproject/experimental": "^5.7.0",
|
|
24
24
|
"@ethersproject/units": "^5.6.0",
|
|
25
|
-
"@huma-finance/sdk": "^0.0.77-beta.
|
|
26
|
-
"@huma-finance/shared": "^0.0.77-beta.
|
|
27
|
-
"@huma-finance/web-shared": "^0.0.77-beta.
|
|
25
|
+
"@huma-finance/sdk": "^0.0.77-beta.1010+cad23bb",
|
|
26
|
+
"@huma-finance/shared": "^0.0.77-beta.1010+cad23bb",
|
|
27
|
+
"@huma-finance/web-shared": "^0.0.77-beta.1010+cad23bb",
|
|
28
28
|
"@mui/x-date-pickers": "^5.0.7",
|
|
29
29
|
"@notifi-network/notifi-frontend-client": "^1.1.2",
|
|
30
30
|
"@notifi-network/notifi-react": "^1.1.2",
|
|
@@ -190,5 +190,5 @@
|
|
|
190
190
|
"optionalDependencies": {
|
|
191
191
|
"encoding": "^0.1.13"
|
|
192
192
|
},
|
|
193
|
-
"gitHead": "
|
|
193
|
+
"gitHead": "cad23bbd7959598dd3e5ad45761259a4e5a98666"
|
|
194
194
|
}
|
|
@@ -113,7 +113,11 @@ export function SolanaLendWithdraw({
|
|
|
113
113
|
: poolState.juniorTrancheAssets
|
|
114
114
|
|
|
115
115
|
const trancheAssetsVal = new BN(trancheAssets ?? 1)
|
|
116
|
-
const trancheSupplyVal = new BN(
|
|
116
|
+
const trancheSupplyVal = new BN(
|
|
117
|
+
trancheMintAccount.supply.toString(),
|
|
118
|
+
).isZero()
|
|
119
|
+
? new BN(1)
|
|
120
|
+
: new BN(trancheMintAccount.supply.toString())
|
|
117
121
|
const sharePrice =
|
|
118
122
|
trancheAssetsVal.muln(100000).div(trancheSupplyVal).toNumber() / 100000
|
|
119
123
|
setSharePrice(sharePrice)
|