@huma-finance/widgets 0.0.62-beta.700 → 0.0.62-beta.701

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.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import { JsonRpcProvider } from '@ethersproject/providers';
3
3
  import { Provider } from '@web3-react/types';
4
- import { POOL_NAME, POOL_TYPE, TrancheType, IdentityVerificationStatusV2, SolanaPoolInfo } from '@huma-finance/shared';
4
+ import { POOL_NAME, POOL_TYPE, TrancheType, CloseModalOptions, SolanaPoolInfo } from '@huma-finance/shared';
5
5
  import { BigNumberish, BigNumber } from 'ethers';
6
6
  import { SolanaPoolState } from '@huma-finance/web-shared';
7
7
  import React from 'react';
@@ -194,14 +194,14 @@ interface Campaign {
194
194
  * @property {POOL_NAME} poolName The name of the pool.
195
195
  * @property {boolean} pointsTestnetExperience If the user is in the testnet experience.
196
196
  * @property {Campaign} campaign The campaign info.
197
- * @property {function((IdentityVerificationStatusV2|undefined)):void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
197
+ * @property {function((CloseModalOptions|undefined)):void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
198
198
  * @property {function((number|undefined)):void|undefined} handleSuccess Optional function to notify that the lending pool supply action is successful.
199
199
  */
200
200
  interface LendSupplyPropsV2 {
201
201
  poolName: keyof typeof POOL_NAME;
202
202
  pointsTestnetExperience: boolean;
203
203
  campaign?: Campaign;
204
- handleClose: (identityStatus?: IdentityVerificationStatusV2) => void;
204
+ handleClose: (options?: CloseModalOptions) => void;
205
205
  handleSuccess?: (blockNumber?: number) => void;
206
206
  }
207
207
 
@@ -271,14 +271,14 @@ type ReceivableBackedCreditLinePaymentPropsV2 = {
271
271
  * @property {SolanaPoolInfo} poolInfo The metadata of the pool.
272
272
  * @property {SolanaPoolState} poolState The current state config of the pool.
273
273
  * @property {boolean} pointsTestnetExperience If the user is in the testnet experience.
274
- * @property {function():void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
274
+ * @property {function((CloseModalOptions|undefined)):void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
275
275
  * @property {function():void|undefined} handleSuccess Optional function to notify that the lending pool supply action is successful.
276
276
  */
277
277
  interface SolanaLendSupplyProps {
278
278
  poolInfo: SolanaPoolInfo;
279
279
  poolState: SolanaPoolState;
280
280
  pointsTestnetExperience: boolean;
281
- handleClose: () => void;
281
+ handleClose: (options?: CloseModalOptions) => void;
282
282
  handleSuccess?: () => void;
283
283
  }
284
284
 
package/dist/index.js CHANGED
@@ -5837,10 +5837,14 @@ function PersonaEvaluation(_ref) {
5837
5837
  case IdentityVerificationStatusV2.DECLINED:
5838
5838
  case IdentityVerificationStatusV2.NEEDS_REVIEW:
5839
5839
  case IdentityVerificationStatusV2.APPROVED:
5840
- handleClose(verificationStatus.status);
5840
+ handleClose({
5841
+ identityStatus: verificationStatus.status
5842
+ });
5841
5843
  break;
5842
5844
  case IdentityVerificationStatusV2.BYPASSED:
5843
- handleClose(IdentityVerificationStatusV2.APPROVED);
5845
+ handleClose({
5846
+ identityStatus: IdentityVerificationStatusV2.APPROVED
5847
+ });
5844
5848
  break;
5845
5849
  }
5846
5850
  }
@@ -8848,10 +8852,10 @@ function SolanaTxDoneModal(_ref) {
8848
8852
  let {
8849
8853
  content,
8850
8854
  subContent,
8851
- handleAction,
8852
8855
  solanaSignature,
8853
8856
  chainId,
8854
- buttonText
8857
+ buttonText,
8858
+ handleAction
8855
8859
  } = _ref;
8856
8860
  const theme = useTheme();
8857
8861
  const dispatch = useAppDispatch();
@@ -8934,7 +8938,9 @@ function Success(_ref) {
8934
8938
  if (campaign) {
8935
8939
  dispatch(setStep(WIDGET_STEP.PointsEarned));
8936
8940
  } else {
8937
- handleAction();
8941
+ handleAction({
8942
+ isSuccess: true
8943
+ });
8938
8944
  }
8939
8945
  }, [campaign, dispatch, handleAction]);
8940
8946
  return jsx(SolanaTxDoneModal, {