@huma-finance/widgets 0.0.12 → 0.0.15
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 +6 -5
- package/dist/cjs/index.cjs +5058 -5968
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.js +5059 -5969
- package/dist/index.js.map +1 -1
- package/package.json +16 -16
- package/src/components/ApproveAllowanceModal.tsx +5 -2
- package/src/components/ChainNotSupportedModal.tsx +33 -0
- package/src/components/ChooseAmountModal.tsx +322 -322
- package/src/components/ConfirmTransferModal.tsx +153 -0
- package/src/components/CreditLine/borrow/1-Evaluation.tsx +1 -2
- package/src/components/CreditLine/borrow/index.tsx +4 -6
- package/src/components/Factoring/FactoredList.tsx +1 -1
- package/src/components/InvoiceFactoring/borrow/1-Evaluation.tsx +1 -4
- package/src/components/InvoiceFactoring/borrow/{3-ChooseAmount.tsx → 2-ChooseAmount.tsx} +5 -3
- package/src/components/InvoiceFactoring/borrow/3-ConfirmTransfer.tsx +37 -0
- package/src/components/InvoiceFactoring/borrow/index.tsx +5 -7
- package/src/components/StreamFactoring/borrow/1-Evaluation.tsx +12 -4
- package/src/components/StreamFactoring/borrow/2-ChooseAmount.tsx +4 -1
- package/src/components/StreamFactoring/borrow/3-ConfirmTransfer.tsx +18 -80
- package/src/components/StreamFactoring/borrow/4-ApproveAllowance.tsx +4 -36
- package/src/components/StreamFactoring/borrow/5-Permit.tsx +14 -14
- package/src/components/SuperfluidFactoring/SuperfluidFactoredList.tsx +10 -1
- package/src/components/SuperfluidFactoring/SuperfluidUpcomingList.tsx +4 -22
- package/src/cosmos/CreditLineBorrow.fixture.tsx +1 -0
- package/src/cosmos/CreditLinePayment.fixture.tsx +1 -0
- package/src/cosmos/SDKTesting.fixture.tsx +615 -615
- package/src/cosmos/SuperfluidFactoringBorrow.fixture.tsx +3 -0
- package/src/cosmos/utils/env.ts +6 -0
- package/src/hooks/useEA.ts +10 -29
- package/src/index.tsx +88 -7
- package/src/reportWebVitals.ts +9 -9
- package/src/store/widgets.store.ts +0 -1
- package/src/utilTypes.d.ts +2 -0
- package/webpack.cosmos.js +9 -9
- package/src/components/AllowListModal.tsx +0 -113
- package/src/components/CreditLine/borrow/2-AllowList.tsx +0 -34
- package/src/components/InvoiceFactoring/borrow/2-AllowList.tsx +0 -34
- package/src/components/InvoiceFactoring/borrow/4-ConfirmTransfer.tsx +0 -104
- /package/src/components/CreditLine/borrow/{3-ChooseAmount.tsx → 2-ChooseAmount.tsx} +0 -0
- /package/src/components/CreditLine/borrow/{4-Transfer.tsx → 3-Transfer.tsx} +0 -0
- /package/src/components/CreditLine/borrow/{5-ApproveAllowance.tsx → 4-ApproveAllowance.tsx} +0 -0
- /package/src/components/CreditLine/borrow/{6-Success.tsx → 5-Success.tsx} +0 -0
- /package/src/components/InvoiceFactoring/borrow/{5-ApproveNFT.tsx → 4-ApproveNFT.tsx} +0 -0
- /package/src/components/InvoiceFactoring/borrow/{6-Transfer.tsx → 5-Transfer.tsx} +0 -0
- /package/src/components/InvoiceFactoring/borrow/{7-Success.tsx → 6-Success.tsx} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -109,10 +109,13 @@ type JsonRpcConnectionMap = {
|
|
|
109
109
|
/**
|
|
110
110
|
* Object representing the props passed to web3 provider
|
|
111
111
|
* @typedef {Object} WidgetProps
|
|
112
|
+
* @property {desiredChainId|undefined} desiredChainId Optional desired chain id, will trigger the switch network action if different from the current chain id
|
|
112
113
|
* @property {JsonRpcConnectionMap|undefined} jsonRpcUrlMap Optional mapping of your JSON-RPC connections indexed by chainId
|
|
113
114
|
* @property {Eip1193Provider|JsonRpcProvider|null|undefined} provider Optional EIP-1193 provider or JsonRpc Provider
|
|
114
115
|
*/
|
|
115
116
|
type WidgetProps = {
|
|
117
|
+
handleClose?: () => void;
|
|
118
|
+
desiredChainId?: number;
|
|
116
119
|
jsonRpcUrlMap?: JsonRpcConnectionMap;
|
|
117
120
|
provider?: Provider | JsonRpcProvider | null;
|
|
118
121
|
};
|
|
@@ -126,7 +129,7 @@ type InvoiceFactoringBorrowWidgetProps = InvoiceFactoringBorrowProps & WidgetPro
|
|
|
126
129
|
/**
|
|
127
130
|
* Invoice factoring borrow widget
|
|
128
131
|
*
|
|
129
|
-
* @param {
|
|
132
|
+
* @param {InvoiceFactoringBorrowProps | WidgetProps} props - The invoice factoring pool borrow widget props.
|
|
130
133
|
* @returns Invoice factoring pool borrow widget component
|
|
131
134
|
*/
|
|
132
135
|
declare function InvoiceFactoringBorrowWidget(props: InvoiceFactoringBorrowWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -140,7 +143,7 @@ type InvoiceFactoringPaymentWidgetProps = InvoiceFactoringPaymentProps & WidgetP
|
|
|
140
143
|
/**
|
|
141
144
|
* Invoice factoring payment widget
|
|
142
145
|
*
|
|
143
|
-
* @param {
|
|
146
|
+
* @param {InvoiceFactoringPaymentProps | WidgetProps} props - The invoice factoring pool payment widget props.
|
|
144
147
|
* @returns Invoice factoring pool payment widget component
|
|
145
148
|
*/
|
|
146
149
|
declare function InvoiceFactoringPaymentWidget(props: InvoiceFactoringPaymentWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -154,7 +157,7 @@ type CreditLineBorrowWidgetProps = CreditLineBorrowProps & WidgetProps;
|
|
|
154
157
|
/**
|
|
155
158
|
* Credit line borrow widget
|
|
156
159
|
*
|
|
157
|
-
* @param {
|
|
160
|
+
* @param {CreditLineBorrowProps | WidgetProps} props - The credit line pool borrow widget props.
|
|
158
161
|
* @returns Credit line pool borrow widget component
|
|
159
162
|
*/
|
|
160
163
|
declare function CreditLineBorrowWidget(props: CreditLineBorrowWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -168,7 +171,7 @@ type CreditLinePaymentWidgetProps = CreditLinePaymentProps & WidgetProps;
|
|
|
168
171
|
/**
|
|
169
172
|
* Credit line payment widget
|
|
170
173
|
*
|
|
171
|
-
* @param {
|
|
174
|
+
* @param {CreditLinePaymentProps | WidgetProps} props - The credit line pool payment widget props.
|
|
172
175
|
* @returns Credit line pool payment widget component
|
|
173
176
|
*/
|
|
174
177
|
declare function CreditLinePaymentWidget(props: CreditLinePaymentWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -182,7 +185,7 @@ type LendSupplyWidgetProps = LendSupplyProps & WidgetProps;
|
|
|
182
185
|
/**
|
|
183
186
|
* Lend supply widget
|
|
184
187
|
*
|
|
185
|
-
* @param {
|
|
188
|
+
* @param {LendSupplyProps | WidgetProps} props - The lend pool supply widget props.
|
|
186
189
|
* @returns Lend pool supply widget component
|
|
187
190
|
*/
|
|
188
191
|
declare function LendSupplyWidget(props: LendSupplyWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -196,7 +199,7 @@ type LendWithdrawWidgetProps = LendWithdrawProps & WidgetProps;
|
|
|
196
199
|
/**
|
|
197
200
|
* Lend withdraw widget
|
|
198
201
|
*
|
|
199
|
-
* @param {LendWithdrawProps
|
|
202
|
+
* @param {LendWithdrawProps | WidgetProps} props The lend pool withdraw widget props
|
|
200
203
|
* @returns Lend pool withdraw widget component
|
|
201
204
|
*/
|
|
202
205
|
declare function LendWithdrawWidget(props: LendWithdrawWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
|