@huma-finance/widgets 0.0.48-beta.296 → 0.0.48-beta.298
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 +69 -22
- package/dist/cjs/index.cjs +2105 -2188
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.d.ts +45 -14
- package/dist/index.js +2105 -2189
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/components/CreditLine/borrowV2/3-Transfer.tsx +1 -1
- package/src/components/CreditLine/paymentV2/1-ChooseAmount.tsx +5 -0
- package/src/components/InputAmountModal.tsx +32 -5
- package/src/components/Lend/{withdrawV2 → addRedemptionV2}/1-ChooseTranche.tsx +25 -30
- package/src/components/Lend/addRedemptionV2/2-ChooseAmount.tsx +62 -0
- package/src/components/Lend/{redeemV2 → addRedemptionV2}/3-Transfer.tsx +7 -12
- package/src/components/Lend/addRedemptionV2/4-Done.tsx +20 -0
- package/src/components/Lend/addRedemptionV2/index.tsx +172 -0
- package/src/components/Lend/cancelRedemptionV2 /1-Transfer.tsx +51 -0
- package/src/components/Lend/cancelRedemptionV2 /2-Done.tsx +29 -0
- package/src/components/Lend/cancelRedemptionV2 /index.tsx +120 -0
- package/src/components/Lend/supplyV2/1-ChooseTranche.tsx +23 -21
- package/src/components/Lend/supplyV2/3-ChooseAmount.tsx +20 -30
- package/src/components/Lend/supplyV2/4-ApproveAllowance.tsx +2 -15
- package/src/components/Lend/supplyV2/5-Transfer.tsx +14 -58
- package/src/components/Lend/supplyV2/6-Success.tsx +5 -2
- package/src/components/Lend/supplyV2/index.tsx +31 -59
- package/src/components/Lend/withdrawV2/1-ConfirmTransfer.tsx +135 -0
- package/src/components/Lend/withdrawV2/2-Transfer.tsx +50 -0
- package/src/components/Lend/withdrawV2/index.tsx +89 -130
- package/src/index.tsx +44 -15
- package/src/components/Lend/redeemV2/1-ChooseAction.tsx +0 -237
- package/src/components/Lend/redeemV2/2-ChooseAmount.tsx +0 -101
- package/src/components/Lend/redeemV2/4-Done.tsx +0 -33
- package/src/components/Lend/redeemV2/index.tsx +0 -207
- package/src/components/Lend/withdrawV2/2-ChooseAmount.tsx +0 -88
- package/src/components/Lend/withdrawV2/3-Transfer.tsx +0 -110
- /package/src/components/Lend/withdrawV2/{4-Done.tsx → 3-Done.tsx} +0 -0
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 } from '@huma-finance/shared';
|
|
4
|
+
import { POOL_NAME, POOL_TYPE, TrancheType } from '@huma-finance/shared';
|
|
5
5
|
import { BigNumberish, BigNumber } from 'ethers';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -138,14 +138,29 @@ type InvoiceFactoringPaymentProps = {
|
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
|
-
* Lend pool
|
|
142
|
-
* @typedef {Object}
|
|
141
|
+
* Lend pool add redemption props
|
|
142
|
+
* @typedef {Object} AddRedemptionPropsV2
|
|
143
|
+
* @property {POOL_NAME} poolName The name of the pool.
|
|
144
|
+
* @property {function():void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
|
|
145
|
+
* @property {function((number|undefined)):void|undefined} handleSuccess Optional function to notify that the lending pool withdraw action is successful.
|
|
146
|
+
*/
|
|
147
|
+
type AddRedemptionPropsV2 = {
|
|
148
|
+
poolName: keyof typeof POOL_NAME;
|
|
149
|
+
handleClose: () => void;
|
|
150
|
+
handleSuccess?: (blockNumber?: number) => void;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Lend pool cancel redemption request props
|
|
155
|
+
* @typedef {Object} CancelRedemptionPropsV2
|
|
143
156
|
* @property {POOL_NAME} poolName The name of the pool.
|
|
157
|
+
* @property {TrancheType} trancheType The type of the tranche.
|
|
144
158
|
* @property {function():void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
|
|
145
159
|
* @property {function((number|undefined)):void|undefined} handleSuccess Optional function to notify that the lending pool withdraw action is successful.
|
|
146
160
|
*/
|
|
147
|
-
type
|
|
161
|
+
type CancelRedemptionPropsV2 = {
|
|
148
162
|
poolName: keyof typeof POOL_NAME;
|
|
163
|
+
trancheType: TrancheType;
|
|
149
164
|
handleClose: () => void;
|
|
150
165
|
handleSuccess?: (blockNumber?: number) => void;
|
|
151
166
|
};
|
|
@@ -197,11 +212,13 @@ type LendWithdrawProps = {
|
|
|
197
212
|
* Lend pool withdraw props
|
|
198
213
|
* @typedef {Object} LendWithdrawPropsV2
|
|
199
214
|
* @property {POOL_NAME} poolName The name of the pool.
|
|
215
|
+
* @property {TrancheType} trancheType The type of the tranche.
|
|
200
216
|
* @property {function():void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
|
|
201
217
|
* @property {function((number|undefined)):void|undefined} handleSuccess Optional function to notify that the lending pool withdraw action is successful.
|
|
202
218
|
*/
|
|
203
219
|
type LendWithdrawPropsV2 = {
|
|
204
220
|
poolName: keyof typeof POOL_NAME;
|
|
221
|
+
trancheType: TrancheType;
|
|
205
222
|
handleClose: () => void;
|
|
206
223
|
handleSuccess?: (blockNumber?: number) => void;
|
|
207
224
|
};
|
|
@@ -400,7 +417,7 @@ type LendWithdrawWidgetProps = LendWithdrawProps & WidgetProps;
|
|
|
400
417
|
declare function LendWithdrawWidget(props: LendWithdrawWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
401
418
|
/**
|
|
402
419
|
* Lend pool supply widget props V2
|
|
403
|
-
* @typedef {Object}
|
|
420
|
+
* @typedef {Object} LendWithdrawWidgetPropsV2
|
|
404
421
|
* @property {LendWithdrawPropsV2} LendSupplyPropsV2 - Lend pool supply props V2.
|
|
405
422
|
* @property {WidgetProps} WidgetProps - Widget general props.
|
|
406
423
|
*/
|
|
@@ -413,19 +430,33 @@ type LendWithdrawWidgetPropsV2 = LendWithdrawPropsV2 & WidgetProps;
|
|
|
413
430
|
*/
|
|
414
431
|
declare function LendWithdrawWidgetV2(props: LendWithdrawWidgetPropsV2): _emotion_react_jsx_runtime.JSX.Element;
|
|
415
432
|
/**
|
|
416
|
-
* Lend pool
|
|
417
|
-
* @typedef {Object}
|
|
418
|
-
* @property {
|
|
433
|
+
* Lend pool add redemption widget props V2
|
|
434
|
+
* @typedef {Object} AddRedemptionWidgetPropsV2
|
|
435
|
+
* @property {AddRedemptionWidgetPropsV2} AddRedemptionWidgetPropsV2 - Lend pool add redemption props V2.
|
|
436
|
+
* @property {WidgetProps} WidgetProps - Widget general props.
|
|
437
|
+
*/
|
|
438
|
+
type AddRedemptionWidgetPropsV2 = AddRedemptionPropsV2 & WidgetProps;
|
|
439
|
+
/**
|
|
440
|
+
* Add redemption widget V2
|
|
441
|
+
*
|
|
442
|
+
* @param {AddRedemptionWidgetPropsV2} props - The lend pool add redemption widget props V2.
|
|
443
|
+
* @returns Lend pool add redemption widget component V2
|
|
444
|
+
*/
|
|
445
|
+
declare function AddRedemptionWidgetV2(props: AddRedemptionWidgetPropsV2): _emotion_react_jsx_runtime.JSX.Element;
|
|
446
|
+
/**
|
|
447
|
+
* Lend pool cancel redemption widget props V2
|
|
448
|
+
* @typedef {Object} CancelRedemptionWidgetPropsV2
|
|
449
|
+
* @property {CancelRedemptionWidgetPropsV2} CancelRedemptionWidgetPropsV2 - Lend pool cancel redemption props V2.
|
|
419
450
|
* @property {WidgetProps} WidgetProps - Widget general props.
|
|
420
451
|
*/
|
|
421
|
-
type
|
|
452
|
+
type CancelRedemptionWidgetPropsV2 = CancelRedemptionPropsV2 & WidgetProps;
|
|
422
453
|
/**
|
|
423
|
-
*
|
|
454
|
+
* Cancel redemption widget V2
|
|
424
455
|
*
|
|
425
|
-
* @param {
|
|
426
|
-
* @returns Lend pool
|
|
456
|
+
* @param {CancelRedemptionWidgetPropsV2} props - The lend pool cancel redemption widget props V2.
|
|
457
|
+
* @returns Lend pool cancel redemption widget component V2
|
|
427
458
|
*/
|
|
428
|
-
declare function
|
|
459
|
+
declare function CancelRedemptionWidgetV2(props: CancelRedemptionWidgetPropsV2): _emotion_react_jsx_runtime.JSX.Element;
|
|
429
460
|
/**
|
|
430
461
|
* Supply first loss cover widget props
|
|
431
462
|
* @typedef {Object} SupplyFirstLossCoverWidgetProps
|
|
@@ -490,4 +521,4 @@ type ReceivableBackedCreditLinePaymentWidgetPropsV2 = ReceivableBackedCreditLine
|
|
|
490
521
|
*/
|
|
491
522
|
declare function ReceivableBackedCreditLinePaymentWidgetV2(props: ReceivableBackedCreditLinePaymentWidgetPropsV2): _emotion_react_jsx_runtime.JSX.Element;
|
|
492
523
|
|
|
493
|
-
export { AutoPaybackWidgetV2, CreditLineApproveWidget, CreditLineBorrowWidget, CreditLineBorrowWidgetV2, CreditLinePaymentWidget, CreditLinePaymentWidgetV2, InvoiceFactoringBorrowWidget, InvoiceFactoringPaymentWidget,
|
|
524
|
+
export { AddRedemptionWidgetV2, AutoPaybackWidgetV2, CancelRedemptionWidgetV2, CreditLineApproveWidget, CreditLineBorrowWidget, CreditLineBorrowWidgetV2, CreditLinePaymentWidget, CreditLinePaymentWidgetV2, InvoiceFactoringBorrowWidget, InvoiceFactoringPaymentWidget, LendSupplyWidget, LendSupplyWidgetV2, LendWithdrawWidget, LendWithdrawWidgetV2, ReceivableBackedCreditLineBorrowWidgetV2, ReceivableBackedCreditLinePaymentWidgetV2, SuperfluidFactoringWidget, SupplyFirstLossCoverWidget };
|