@huma-finance/widgets 0.0.75-beta.984 → 0.0.75-beta.988

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
@@ -178169,9 +178169,7 @@ function SolanaTxSendModal({
178169
178169
  }), ur({ signature: Tr });
178170
178170
  return;
178171
178171
  }
178172
- if ((await hr.getLatestBlockhash(
178173
- "confirmed"
178174
- )).lastValidBlockHeight - Dr.lastValidBlockHeight > 100) {
178172
+ if (await hr.getBlockHeight("confirmed") > Dr.lastValidBlockHeight) {
178175
178173
  Cr.logAction("ShowRetryScreenDueToExpiration", {
178176
178174
  signature: Tr
178177
178175
  }), Sr(!0);
@@ -182500,11 +182498,7 @@ function Transfer$a({
182500
182498
  BigInt(ur === "senior" ? or.seniorTrancheAssets ?? 0 : or.juniorTrancheAssets ?? 0),
182501
182499
  BigInt(ur === "senior" ? (Br == null ? void 0 : Br.toString()) ?? 0 : (Pr == null ? void 0 : Pr.toString()) ?? 0),
182502
182500
  BigInt(Ar.toString())
182503
- ), Rr = convertToShares(
182504
- BigInt(ur === "senior" ? or.seniorTrancheAssets ?? 0 : or.juniorTrancheAssets ?? 0),
182505
- BigInt(ur === "senior" ? (Br == null ? void 0 : Br.toString()) ?? 0 : (Pr == null ? void 0 : Pr.toString()) ?? 0),
182506
- BigInt(ur === "senior" ? (Ur == null ? void 0 : Ur.amount.toString()) ?? "0" : (Qr == null ? void 0 : Qr.amount.toString()) ?? "0")
182507
- );
182501
+ ), Rr = BigInt(ur === "senior" ? (Ur == null ? void 0 : Ur.amount.toString()) ?? "0" : (Qr == null ? void 0 : Qr.amount.toString()) ?? "0");
182508
182502
  Vr.add(
182509
182503
  createApproveCheckedInstruction(
182510
182504
  ur === "senior" ? Dr : br,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huma-finance/widgets",
3
- "version": "0.0.75-beta.984+6489f74",
3
+ "version": "0.0.75-beta.988+26df29a",
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.75-beta.984+6489f74",
26
- "@huma-finance/shared": "^0.0.75-beta.984+6489f74",
27
- "@huma-finance/web-shared": "^0.0.75-beta.984+6489f74",
25
+ "@huma-finance/sdk": "^0.0.75-beta.988+26df29a",
26
+ "@huma-finance/shared": "^0.0.75-beta.988+26df29a",
27
+ "@huma-finance/web-shared": "^0.0.75-beta.988+26df29a",
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": "6489f7486bb63b2bc021539cd339260b601e1c49"
193
+ "gitHead": "26df29a7d408edab87353f12760681307ba01c9d"
194
194
  }
@@ -156,17 +156,11 @@ export function Transfer({
156
156
  : BigInt(juniorTrancheMintSupply?.toString() ?? 0),
157
157
  BigInt(supplyBigNumber.toString()),
158
158
  )
159
- const existingShares = convertToShares(
160
- selectedTranche === 'senior'
161
- ? BigInt(poolState.seniorTrancheAssets ?? 0)
162
- : BigInt(poolState.juniorTrancheAssets ?? 0),
163
- selectedTranche === 'senior'
164
- ? BigInt(seniorTrancheMintSupply?.toString() ?? 0)
165
- : BigInt(juniorTrancheMintSupply?.toString() ?? 0),
159
+ const existingShares =
166
160
  selectedTranche === 'senior'
167
161
  ? BigInt(seniorTokenAccount?.amount.toString() ?? '0')
168
- : BigInt(juniorTokenAccount?.amount.toString() ?? '0'),
169
- )
162
+ : BigInt(juniorTokenAccount?.amount.toString() ?? '0')
163
+
170
164
  tx.add(
171
165
  createApproveCheckedInstruction(
172
166
  selectedTranche === 'senior' ? seniorTrancheATA : juniorTrancheATA,
@@ -156,14 +156,8 @@ export function SolanaTxSendModal({
156
156
  }
157
157
 
158
158
  // eslint-disable-next-line no-await-in-loop
159
- const latestBlockhash = await connection.getLatestBlockhash(
160
- 'confirmed',
161
- )
162
- if (
163
- latestBlockhash.lastValidBlockHeight -
164
- optimizedTx.lastValidBlockHeight! >
165
- 100
166
- ) {
159
+ const latestBlockheight = await connection.getBlockHeight('confirmed')
160
+ if (latestBlockheight > optimizedTx.lastValidBlockHeight!) {
167
161
  loggingHelper.logAction('ShowRetryScreenDueToExpiration', {
168
162
  signature: signatureResult,
169
163
  })