@huma-finance/widgets 0.0.11 → 0.0.13

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.
Files changed (46) hide show
  1. package/API.md +6 -5
  2. package/dist/cjs/index.cjs +5058 -5959
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/index.d.ts +9 -6
  5. package/dist/index.js +5059 -5960
  6. package/dist/index.js.map +1 -1
  7. package/package.json +16 -16
  8. package/src/components/ApproveAllowanceModal.tsx +5 -2
  9. package/src/components/ChainNotSupportedModal.tsx +31 -0
  10. package/src/components/ChooseAmountModal.tsx +322 -315
  11. package/src/components/ConfirmTransferModal.tsx +153 -0
  12. package/src/components/CreditLine/borrow/1-Evaluation.tsx +1 -2
  13. package/src/components/CreditLine/borrow/{3-ChooseAmount.tsx → 2-ChooseAmount.tsx} +2 -8
  14. package/src/components/CreditLine/borrow/{5-Transfer.tsx → 3-Transfer.tsx} +17 -3
  15. package/src/components/CreditLine/borrow/4-ApproveAllowance.tsx +1 -1
  16. package/src/components/CreditLine/borrow/index.tsx +3 -5
  17. package/src/components/Factoring/FactoredList.tsx +1 -1
  18. package/src/components/InvoiceFactoring/borrow/1-Evaluation.tsx +1 -4
  19. package/src/components/InvoiceFactoring/borrow/{3-ChooseAmount.tsx → 2-ChooseAmount.tsx} +5 -3
  20. package/src/components/InvoiceFactoring/borrow/3-ConfirmTransfer.tsx +37 -0
  21. package/src/components/InvoiceFactoring/borrow/index.tsx +5 -7
  22. package/src/components/StreamFactoring/borrow/1-Evaluation.tsx +11 -3
  23. package/src/components/StreamFactoring/borrow/2-ChooseAmount.tsx +4 -1
  24. package/src/components/StreamFactoring/borrow/3-ConfirmTransfer.tsx +18 -80
  25. package/src/components/StreamFactoring/borrow/4-ApproveAllowance.tsx +4 -36
  26. package/src/components/StreamFactoring/borrow/5-Permit.tsx +14 -14
  27. package/src/components/SuperfluidFactoring/SuperfluidUpcomingList.tsx +1 -1
  28. package/src/cosmos/CreditLineBorrow.fixture.tsx +1 -0
  29. package/src/cosmos/CreditLinePayment.fixture.tsx +1 -0
  30. package/src/cosmos/SDKTesting.fixture.tsx +615 -557
  31. package/src/cosmos/SuperfluidFactoringBorrow.fixture.tsx +3 -0
  32. package/src/cosmos/utils/env.ts +6 -0
  33. package/src/hooks/useEA.ts +10 -29
  34. package/src/index.tsx +75 -7
  35. package/src/reportWebVitals.ts +9 -9
  36. package/src/store/widgets.store.ts +0 -1
  37. package/src/utilTypes.d.ts +2 -0
  38. package/webpack.cosmos.js +9 -9
  39. package/src/components/AllowListModal.tsx +0 -113
  40. package/src/components/CreditLine/borrow/2-AllowList.tsx +0 -34
  41. package/src/components/InvoiceFactoring/borrow/2-AllowList.tsx +0 -34
  42. package/src/components/InvoiceFactoring/borrow/4-ConfirmTransfer.tsx +0 -104
  43. /package/src/components/CreditLine/borrow/{6-Success.tsx → 5-Success.tsx} +0 -0
  44. /package/src/components/InvoiceFactoring/borrow/{5-ApproveNFT.tsx → 4-ApproveNFT.tsx} +0 -0
  45. /package/src/components/InvoiceFactoring/borrow/{6-Transfer.tsx → 5-Transfer.tsx} +0 -0
  46. /package/src/components/InvoiceFactoring/borrow/{7-Success.tsx → 6-Success.tsx} +0 -0
package/API.md CHANGED
@@ -60,7 +60,7 @@
60
60
 
61
61
  | Param | Type | Description |
62
62
  | --- | --- | --- |
63
- | props | [<code>InvoiceFactoringBorrowWidgetProps</code>](#InvoiceFactoringBorrowWidgetProps) | <p>The invoice factoring pool borrow widget props.</p> |
63
+ | props | [<code>InvoiceFactoringBorrowProps</code>](#InvoiceFactoringBorrowProps) \| [<code>WidgetProps</code>](#WidgetProps) | <p>The invoice factoring pool borrow widget props.</p> |
64
64
 
65
65
  <a name="InvoiceFactoringPaymentWidget"></a>
66
66
 
@@ -72,7 +72,7 @@
72
72
 
73
73
  | Param | Type | Description |
74
74
  | --- | --- | --- |
75
- | props | [<code>InvoiceFactoringPaymentWidgetProps</code>](#InvoiceFactoringPaymentWidgetProps) | <p>The invoice factoring pool payment widget props.</p> |
75
+ | props | [<code>InvoiceFactoringPaymentProps</code>](#InvoiceFactoringPaymentProps) \| [<code>WidgetProps</code>](#WidgetProps) | <p>The invoice factoring pool payment widget props.</p> |
76
76
 
77
77
  <a name="CreditLineBorrowWidget"></a>
78
78
 
@@ -84,7 +84,7 @@
84
84
 
85
85
  | Param | Type | Description |
86
86
  | --- | --- | --- |
87
- | props | [<code>CreditLineBorrowWidgetProps</code>](#CreditLineBorrowWidgetProps) | <p>The credit line pool borrow widget props.</p> |
87
+ | props | [<code>CreditLineBorrowProps</code>](#CreditLineBorrowProps) \| [<code>WidgetProps</code>](#WidgetProps) | <p>The credit line pool borrow widget props.</p> |
88
88
 
89
89
  <a name="CreditLinePaymentWidget"></a>
90
90
 
@@ -96,7 +96,7 @@
96
96
 
97
97
  | Param | Type | Description |
98
98
  | --- | --- | --- |
99
- | props | [<code>CreditLinePaymentWidgetProps</code>](#CreditLinePaymentWidgetProps) | <p>The credit line pool payment widget props.</p> |
99
+ | props | [<code>CreditLinePaymentProps</code>](#CreditLinePaymentProps) \| [<code>WidgetProps</code>](#WidgetProps) | <p>The credit line pool payment widget props.</p> |
100
100
 
101
101
  <a name="LendSupplyWidget"></a>
102
102
 
@@ -108,7 +108,7 @@
108
108
 
109
109
  | Param | Type | Description |
110
110
  | --- | --- | --- |
111
- | props | [<code>LendSupplyWidgetProps</code>](#LendSupplyWidgetProps) | <p>The lend pool supply widget props.</p> |
111
+ | props | [<code>LendSupplyProps</code>](#LendSupplyProps) \| [<code>WidgetProps</code>](#WidgetProps) | <p>The lend pool supply widget props.</p> |
112
112
 
113
113
  <a name="LendWithdrawWidget"></a>
114
114
 
@@ -248,6 +248,7 @@
248
248
 
249
249
  | Name | Type | Description |
250
250
  | --- | --- | --- |
251
+ | desiredChainId | <code>desiredChainId</code> \| <code>undefined</code> | <p>Optional desired chain id, will trigger the switch network action if different from the current chain id</p> |
251
252
  | jsonRpcUrlMap | [<code>JsonRpcConnectionMap</code>](#JsonRpcConnectionMap) \| <code>undefined</code> | <p>Optional mapping of your JSON-RPC connections indexed by chainId</p> |
252
253
  | provider | <code>Eip1193Provider</code> \| <code>JsonRpcProvider</code> \| <code>null</code> \| <code>undefined</code> | <p>Optional EIP-1193 provider or JsonRpc Provider</p> |
253
254