@huma-finance/widgets 0.0.63-beta.757 → 0.0.63

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huma-finance/widgets",
3
- "version": "0.0.63-beta.757+9aa80fd",
3
+ "version": "0.0.63",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -29,9 +29,9 @@
29
29
  "@ethersproject/experimental": "^5.7.0",
30
30
  "@ethersproject/providers": "^5.6.0",
31
31
  "@ethersproject/units": "^5.6.0",
32
- "@huma-finance/sdk": "^0.0.63-beta.757+9aa80fd",
33
- "@huma-finance/shared": "^0.0.63-beta.757+9aa80fd",
34
- "@huma-finance/web-shared": "^0.0.63-beta.757+9aa80fd",
32
+ "@huma-finance/sdk": "^0.0.63",
33
+ "@huma-finance/shared": "^0.0.63",
34
+ "@huma-finance/web-shared": "^0.0.63",
35
35
  "@mui/x-date-pickers": "^5.0.7",
36
36
  "@notifi-network/notifi-frontend-client": "^1.1.2",
37
37
  "@notifi-network/notifi-react": "^1.1.2",
@@ -201,5 +201,5 @@
201
201
  "optionalDependencies": {
202
202
  "encoding": "^0.1.13"
203
203
  },
204
- "gitHead": "9aa80fd91c2ff96067ccb9fd96e5bf631069c1e6"
204
+ "gitHead": "af5df1618a6094624bc34cdee8d4cc600d497571"
205
205
  }
@@ -61,9 +61,9 @@ export function Transfer({
61
61
  poolJuniorTrancheATA,
62
62
  } = getTokenAccounts(poolInfo, publicKey)
63
63
  const tx = await program.methods
64
- .addRedemptionRequest(redeemBN)
64
+ .addRedemptionRequest(publicKey, redeemBN)
65
65
  .accountsPartial({
66
- lender: publicKey,
66
+ signer: publicKey,
67
67
  humaConfig: poolInfo.humaConfig,
68
68
  poolConfig: poolInfo.poolConfig,
69
69
  trancheMint:
@@ -142,27 +142,6 @@ export function Transfer({
142
142
  tx.add(createLenderAccountsTx)
143
143
  }
144
144
 
145
- const depositTx = await program.methods
146
- .deposit(supplyBigNumber)
147
- .accountsPartial({
148
- approvedLender,
149
- depositor: publicKey,
150
- poolConfig: poolInfo.poolConfig,
151
- underlyingMint: poolInfo.underlyingMint.address,
152
- trancheMint:
153
- selectedTranche === 'senior'
154
- ? poolInfo.seniorTrancheMint
155
- : poolInfo.juniorTrancheMint,
156
- poolUnderlyingToken: poolInfo.poolUnderlyingTokenAccount,
157
- depositorUnderlyingToken: underlyingTokenATA,
158
- depositorTrancheToken:
159
- selectedTranche === 'senior' ? seniorTrancheATA : juniorTrancheATA,
160
- humaConfig: poolInfo.humaConfig,
161
- underlyingTokenProgram: TOKEN_PROGRAM_ID,
162
- })
163
- .transaction()
164
- tx.add(depositTx)
165
-
166
145
  // Approve automatic redemptions
167
146
  const sharesAmount = convertToShares(
168
147
  selectedTranche === 'senior'
@@ -201,6 +180,27 @@ export function Transfer({
201
180
  ),
202
181
  )
203
182
 
183
+ const depositTx = await program.methods
184
+ .deposit(supplyBigNumber)
185
+ .accountsPartial({
186
+ approvedLender,
187
+ depositor: publicKey,
188
+ poolConfig: poolInfo.poolConfig,
189
+ underlyingMint: poolInfo.underlyingMint.address,
190
+ trancheMint:
191
+ selectedTranche === 'senior'
192
+ ? poolInfo.seniorTrancheMint
193
+ : poolInfo.juniorTrancheMint,
194
+ poolUnderlyingToken: poolInfo.poolUnderlyingTokenAccount,
195
+ depositorUnderlyingToken: underlyingTokenATA,
196
+ depositorTrancheToken:
197
+ selectedTranche === 'senior' ? seniorTrancheATA : juniorTrancheATA,
198
+ humaConfig: poolInfo.humaConfig,
199
+ underlyingTokenProgram: TOKEN_PROGRAM_ID,
200
+ })
201
+ .transaction()
202
+ tx.add(depositTx)
203
+
204
204
  setTransaction(tx)
205
205
  }
206
206
  getTx()