@huma-finance/widgets 0.0.62-beta.612 → 0.0.62-beta.616
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/API.md +0 -185
- package/dist/cjs/index.cjs +955 -2880
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -116
- package/dist/index.js +658 -2601
- package/dist/index.js.map +1 -1
- package/package.json +9 -12
- package/src/components/InputAmountModal.tsx +2 -12
- package/src/components/Lend/addRedemptionV2/2-ChooseAmount.tsx +6 -1
- package/src/components/Lend/supplyV2/6-Success.tsx +10 -8
- package/src/components/Lend/supplyV2/7-Notifications.tsx +6 -1
- package/src/components/Notifi/NotifiContextWrapper.tsx +57 -0
- package/src/components/Notifi/NotifiSubscriptionModal.tsx +118 -113
- package/src/components/WidgetWrapper.tsx +4 -6
- package/src/hooks/useNotifi.ts +28 -17
- package/src/index.tsx +7 -124
- package/src/store/widgets.reducers.ts +0 -5
- package/src/store/widgets.store.ts +0 -1
- package/src/theme/coreThemeConstants.ts +1 -1
- package/src/components/CreditLine/solanaBorrow/1-ChooseAmount.tsx +0 -86
- package/src/components/CreditLine/solanaBorrow/2-ApproveAllowance.tsx +0 -87
- package/src/components/CreditLine/solanaBorrow/index.tsx +0 -96
- package/src/components/Lend/solanaAddRedemption/1-ChooseTranche.tsx +0 -114
- package/src/components/Lend/solanaAddRedemption/2-ChooseAmount.tsx +0 -183
- package/src/components/Lend/solanaAddRedemption/3-Transfer.tsx +0 -102
- package/src/components/Lend/solanaAddRedemption/4-Done.tsx +0 -29
- package/src/components/Lend/solanaAddRedemption/index.tsx +0 -140
- package/src/components/Lend/solanaCancelRedemption/1-ChooseTranche.tsx +0 -114
- package/src/components/Lend/solanaCancelRedemption/2-Transfer.tsx +0 -99
- package/src/components/Lend/solanaCancelRedemption/3-Done.tsx +0 -55
- package/src/components/Lend/solanaCancelRedemption/index.tsx +0 -152
- package/src/components/Lend/solanaSupply/1-ChooseTranche.tsx +0 -116
- package/src/components/Lend/solanaSupply/2-Evaluation.tsx +0 -0
- package/src/components/Lend/solanaSupply/3-ChooseAmount.tsx +0 -130
- package/src/components/Lend/solanaSupply/4-Transfer.tsx +0 -89
- package/src/components/Lend/solanaSupply/5-Success.tsx +0 -50
- package/src/components/Lend/solanaSupply/index.tsx +0 -143
- package/src/components/SolanaTxDoneModal.tsx +0 -115
- package/src/components/SolanaTxSendModal.tsx +0 -61
- package/src/components/SolanaViewOnExplorer.tsx +0 -29
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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
|
|
4
|
+
import { POOL_NAME, POOL_TYPE, TrancheType, IdentityVerificationStatusV2 } from '@huma-finance/shared';
|
|
5
5
|
import { BigNumberish, BigNumber } from 'ethers';
|
|
6
|
-
import
|
|
6
|
+
import React from 'react';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Credit line pool approve allowance props
|
|
@@ -264,60 +264,11 @@ type ReceivableBackedCreditLinePaymentPropsV2 = {
|
|
|
264
264
|
handleSuccess?: (blockNumber?: number) => void;
|
|
265
265
|
};
|
|
266
266
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
* @property {function():void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
|
|
273
|
-
* @property {function():void|undefined} handleSuccess Optional function to notify that the lending pool supply action is successful.
|
|
274
|
-
*/
|
|
275
|
-
interface SolanaLendSupplyProps {
|
|
276
|
-
poolInfo: SolanaPoolInfo;
|
|
277
|
-
poolState: SolanaPoolState;
|
|
278
|
-
handleClose: () => void;
|
|
279
|
-
handleSuccess?: () => void;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Lend pool supply props
|
|
284
|
-
* @typedef {Object} SolanaLendAddRedemptionProps
|
|
285
|
-
* @property {SolanaPoolInfo} poolInfo The metadata of the pool.
|
|
286
|
-
* @property {SolanaPoolState} poolState The current state config of the pool. * @property {function():void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
|
|
287
|
-
* @property {function():void|undefined} handleSuccess Optional function to notify that the lending pool supply action is successful.
|
|
288
|
-
*/
|
|
289
|
-
interface SolanaLendAddRedemptionProps {
|
|
290
|
-
poolInfo: SolanaPoolInfo;
|
|
291
|
-
poolState: SolanaPoolState;
|
|
292
|
-
handleClose: () => void;
|
|
293
|
-
handleSuccess?: () => void;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* Lend pool supply props
|
|
298
|
-
* @typedef {Object} SolanaLendCancelRedemptionProps
|
|
299
|
-
* @property {SolanaPoolInfo} poolInfo The metadata of the pool.
|
|
300
|
-
* @property {SolanaPoolState} poolState The current state config of the pool. * @property {function():void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
|
|
301
|
-
* @property {function():void|undefined} handleSuccess Optional function to notify that the lending pool supply action is successful.
|
|
302
|
-
*/
|
|
303
|
-
interface SolanaLendCancelRedemptionProps {
|
|
304
|
-
poolInfo: SolanaPoolInfo;
|
|
305
|
-
handleClose: () => void;
|
|
306
|
-
handleSuccess?: () => void;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Lend pool supply props
|
|
311
|
-
* @typedef {Object} SolanaBorrowProps
|
|
312
|
-
* @property {SolanaPoolInfo} poolInfo The metadata of the pool.
|
|
313
|
-
* @property {SolanaPoolState} poolState The current state config of the pool. * @property {function():void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
|
|
314
|
-
* @property {function():void|undefined} handleSuccess Optional function to notify that the lending pool supply action is successful.
|
|
315
|
-
*/
|
|
316
|
-
interface SolanaBorrowProps {
|
|
317
|
-
poolInfo: SolanaPoolInfo;
|
|
318
|
-
handleClose: () => void;
|
|
319
|
-
handleSuccess?: () => void;
|
|
320
|
-
}
|
|
267
|
+
type Props = {
|
|
268
|
+
chainId: number | undefined;
|
|
269
|
+
children?: any;
|
|
270
|
+
};
|
|
271
|
+
declare function NotifiContextWrapper({ chainId, children, }: Props): React.ReactElement | null;
|
|
321
272
|
|
|
322
273
|
/**
|
|
323
274
|
* Mapping of your JSON-RPC connections indexed by chainId
|
|
@@ -586,64 +537,5 @@ type ReceivableBackedCreditLinePaymentWidgetPropsV2 = ReceivableBackedCreditLine
|
|
|
586
537
|
* @returns Receivable backed credit line pool payment widget component V2
|
|
587
538
|
*/
|
|
588
539
|
declare function ReceivableBackedCreditLinePaymentWidgetV2(props: ReceivableBackedCreditLinePaymentWidgetPropsV2): _emotion_react_jsx_runtime.JSX.Element;
|
|
589
|
-
/**
|
|
590
|
-
* Object representing the props passed to Solana widgets
|
|
591
|
-
* @typedef {Object} SolanaWidgetProps
|
|
592
|
-
*/
|
|
593
|
-
type SolanaWidgetProps = {
|
|
594
|
-
handleClose?: () => void;
|
|
595
|
-
};
|
|
596
|
-
/**
|
|
597
|
-
* Lend pool supply widget props for Solana pools
|
|
598
|
-
* @typedef {Object} SolanaLendSupplyWidgetProps
|
|
599
|
-
* @property {SolanaLendSupplyProps} SolanaLendSupplyProps - Specific widget props
|
|
600
|
-
* @property {SolanaWidgetProps} SolanaWidgetProps - Widget general props.
|
|
601
|
-
*/
|
|
602
|
-
type SolanaLendSupplyWidgetProps = SolanaLendSupplyProps & SolanaWidgetProps;
|
|
603
|
-
/**
|
|
604
|
-
* Lend pool supply widget for Solana pools
|
|
605
|
-
*
|
|
606
|
-
* @param {SolanaLendSupplyWidgetProps} props - Widget props
|
|
607
|
-
*/
|
|
608
|
-
declare function SolanaLendSupplyWidget(props: SolanaLendSupplyWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
609
|
-
/**
|
|
610
|
-
* Lend pool supply widget props for Solana pools
|
|
611
|
-
* @typedef {Object} SolanaLendAddRedemptionWidgetProps
|
|
612
|
-
* @property {SolanaLendSupplyProps} SolanaLendSupplyProps - Specific widget props
|
|
613
|
-
* @property {SolanaWidgetProps} SolanaWidgetProps - Widget general props.
|
|
614
|
-
*/
|
|
615
|
-
type SolanaLendAddRedemptionWidgetProps = SolanaLendAddRedemptionProps & SolanaWidgetProps;
|
|
616
|
-
/**
|
|
617
|
-
* Lend pool supply widget for Solana pools
|
|
618
|
-
*
|
|
619
|
-
* @param {SolanaLendAddRedemptionWidgetProps} props - Widget props
|
|
620
|
-
*/
|
|
621
|
-
declare function SolanaLendAddRedemptionWidget(props: SolanaLendAddRedemptionWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
622
|
-
/**
|
|
623
|
-
* Lend pool supply widget props for Solana pools
|
|
624
|
-
* @typedef {Object} SolanaLendCancelRedemptionWidgetProps
|
|
625
|
-
* @property {SolanaLendSupplyProps} SolanaLendSupplyProps - Specific widget props
|
|
626
|
-
* @property {SolanaWidgetProps} SolanaWidgetProps - Widget general props.
|
|
627
|
-
*/
|
|
628
|
-
type SolanaLendCancelRedemptionWidgetProps = SolanaLendCancelRedemptionProps & SolanaWidgetProps;
|
|
629
|
-
/**
|
|
630
|
-
* Lend pool supply widget for Solana pools
|
|
631
|
-
*
|
|
632
|
-
* @param {SolanaLendCancelRedemptionWidgetProps} props - Widget props
|
|
633
|
-
*/
|
|
634
|
-
declare function SolanaLendCancelRedemptionWidget(props: SolanaLendCancelRedemptionWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
635
|
-
/**
|
|
636
|
-
* Lend pool supply widget props for Solana pools
|
|
637
|
-
* @typedef {Object} SolanaBorrowWidgetProps
|
|
638
|
-
* @property {SolanaLendSupplyProps} SolanaLendSupplyProps - Specific widget props
|
|
639
|
-
* @property {SolanaWidgetProps} SolanaWidgetProps - Widget general props.
|
|
640
|
-
*/
|
|
641
|
-
type SolanaBorrowWidgetProps = SolanaBorrowProps & SolanaWidgetProps;
|
|
642
|
-
/**
|
|
643
|
-
* Lend pool supply widget for Solana pools
|
|
644
|
-
*
|
|
645
|
-
* @param {SolanaBorrowWidgetProps} props - Widget props
|
|
646
|
-
*/
|
|
647
|
-
declare function SolanaBorrowWidget(props: SolanaBorrowWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
648
540
|
|
|
649
|
-
export { AddRedemptionWidgetV2, AutoPaybackWidgetV2, CancelRedemptionWidgetV2, CreditLineApproveWidget, CreditLineBorrowWidget, CreditLineBorrowWidgetV2, CreditLinePaymentWidget, CreditLinePaymentWidgetV2, InvoiceFactoringBorrowWidget, InvoiceFactoringPaymentWidget, LendSupplyWidget, LendSupplyWidgetV2, LendWithdrawWidget, LendWithdrawWidgetV2, ReceivableBackedCreditLineBorrowWidgetV2, ReceivableBackedCreditLinePaymentWidgetV2,
|
|
541
|
+
export { AddRedemptionWidgetV2, AutoPaybackWidgetV2, CancelRedemptionWidgetV2, CreditLineApproveWidget, CreditLineBorrowWidget, CreditLineBorrowWidgetV2, CreditLinePaymentWidget, CreditLinePaymentWidgetV2, InvoiceFactoringBorrowWidget, InvoiceFactoringPaymentWidget, LendSupplyWidget, LendSupplyWidgetV2, LendWithdrawWidget, LendWithdrawWidgetV2, NotifiContextWrapper, ReceivableBackedCreditLineBorrowWidgetV2, ReceivableBackedCreditLinePaymentWidgetV2, SuperfluidFactoringWidget, SupplyFirstLossCoverWidget };
|