@huma-finance/widgets 0.0.59-beta.513 → 0.0.59-beta.520
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/cjs/index.cjs +135 -134
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/src/components/Activity.tsx +1 -1
- package/src/components/ApproveAllowanceModal.tsx +2 -3
- package/src/components/ApproveAllowanceModalV2.tsx +1 -3
- package/src/components/ChooseAmountModal.tsx +1 -1
- package/src/components/CreditLine/approve/2-Success.tsx +1 -1
- package/src/components/CreditLine/approve/index.tsx +2 -6
- package/src/components/CreditLine/autoPaybackV2/index.tsx +2 -2
- package/src/components/CreditLine/borrow/2-ChooseAmount.tsx +2 -6
- package/src/components/CreditLine/borrow/4-Transfer.tsx +2 -1
- package/src/components/CreditLine/borrow/index.tsx +2 -7
- package/src/components/CreditLine/borrowV2/1-ChooseAmount.tsx +1 -1
- package/src/components/CreditLine/borrowV2/3-Transfer.tsx +2 -1
- package/src/components/CreditLine/borrowV2/index.tsx +2 -3
- package/src/components/CreditLine/payment/1-ChooseAmount.tsx +2 -6
- package/src/components/CreditLine/payment/4-Success.tsx +1 -1
- package/src/components/CreditLine/payment/index.tsx +2 -6
- package/src/components/CreditLine/paymentV2/1-ChooseAmount.tsx +1 -1
- package/src/components/CreditLine/paymentV2/3-Transfer.tsx +1 -1
- package/src/components/CreditLine/paymentV2/4-Success.tsx +1 -1
- package/src/components/CreditLine/paymentV2/index.tsx +2 -2
- package/src/components/CreditLine/supplyFLC/2-Transfer.tsx +2 -5
- package/src/components/CreditLine/supplyFLC/index.tsx +2 -3
- package/src/components/ErrorModal.tsx +1 -1
- package/src/components/Factoring/FactoredList.tsx +1 -2
- package/src/components/Factoring/UpcomingList.tsx +1 -1
- package/src/components/InvoiceFactoring/borrow/2-ChooseAmount.tsx +2 -1
- package/src/components/InvoiceFactoring/borrow/4-ApproveNFT.tsx +2 -3
- package/src/components/InvoiceFactoring/borrow/index.tsx +2 -6
- package/src/components/InvoiceFactoring/payment/1-ChooseAmount.tsx +1 -1
- package/src/components/InvoiceFactoring/payment/index.tsx +2 -6
- package/src/components/Lend/addRedemptionV2/2-ChooseAmount.tsx +3 -1
- package/src/components/Lend/addRedemptionV2/3-Transfer.tsx +2 -5
- package/src/components/Lend/addRedemptionV2/index.tsx +3 -1
- package/src/components/Lend/cancelRedemptionV2 /1-Transfer.tsx +2 -5
- package/src/components/Lend/cancelRedemptionV2 /index.tsx +2 -3
- package/src/components/Lend/supply/1-Evaluation/EvaluationKYC.tsx +1 -2
- package/src/components/Lend/supply/5-Success.tsx +1 -1
- package/src/components/Lend/supply/index.tsx +2 -4
- package/src/components/Lend/supplyV2/3-ChooseAmount.tsx +4 -2
- package/src/components/Lend/supplyV2/5-Transfer.tsx +1 -1
- package/src/components/Lend/supplyV2/6-Success.tsx +2 -2
- package/src/components/Lend/supplyV2/8-PointsEarned.tsx +2 -6
- package/src/components/Lend/supplyV2/components/PersonaEvaluation.tsx +1 -1
- package/src/components/Lend/supplyV2/components/SecuritizeEvaluation.tsx +1 -2
- package/src/components/Lend/supplyV2/index.tsx +3 -5
- package/src/components/Lend/withdraw/1-CheckWithdrawble.tsx +2 -4
- package/src/components/Lend/withdraw/4-Success.tsx +1 -1
- package/src/components/Lend/withdraw/index.tsx +2 -3
- package/src/components/Lend/withdrawV2/2-Transfer.tsx +2 -5
- package/src/components/Lend/withdrawV2/index.tsx +3 -1
- package/src/components/Notifi/NotifiSubscriptionModal.tsx +2 -1
- package/src/components/ReceivableBackedCreditLine/borrow/1-ChooseAmount.tsx +3 -1
- package/src/components/ReceivableBackedCreditLine/borrow/3-ApproveReceivable.tsx +2 -3
- package/src/components/ReceivableBackedCreditLine/borrow/index.tsx +2 -3
- package/src/components/ReceivableBackedCreditLine/payment/2-ChooseAmount.tsx +1 -1
- package/src/components/ReceivableBackedCreditLine/payment/5-ApproveReceivable.tsx +2 -3
- package/src/components/ReceivableBackedCreditLine/payment/index.tsx +2 -2
- package/src/components/StreamFactoring/borrow/2-ChooseAmount.tsx +1 -1
- package/src/components/StreamFactoring/borrow/5-Permit.tsx +1 -2
- package/src/components/StreamFactoring/borrow/6-Transfer.tsx +2 -1
- package/src/components/StreamFactoring/borrow/index.tsx +2 -1
- package/src/components/StreamFactoring/payment/index.tsx +5 -2
- package/src/components/SuperfluidFactoring/index.tsx +1 -1
- package/src/components/TxDoneModal.tsx +1 -1
- package/src/components/TxSendModal.tsx +2 -7
- package/src/components/TxSendModalV2.tsx +2 -1
- package/src/components/WidgetWrapper.tsx +2 -1
- package/src/components/humaModal/HumaModal.tsx +1 -1
- package/src/hooks/useEA.ts +1 -1
- package/src/index.tsx +1 -1
- package/tsconfig.json +3 -0
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
downScale,
|
|
5
5
|
formatMoney,
|
|
6
6
|
PoolInfoType,
|
|
7
|
-
sendTxAtom,
|
|
8
7
|
TRANSFER_ABI,
|
|
9
8
|
} from '@huma-finance/shared'
|
|
9
|
+
import { sendTxAtom } from '@huma-finance/web-shared'
|
|
10
10
|
import { useAtom } from 'jotai'
|
|
11
11
|
import React, { useEffect, useState } from 'react'
|
|
12
12
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useWeb3React } from '@web3-react/core'
|
|
2
|
+
import { POOL_NAME, POOL_TYPE } from '@huma-finance/shared'
|
|
2
3
|
import {
|
|
3
|
-
POOL_NAME,
|
|
4
|
-
POOL_TYPE,
|
|
5
4
|
useLenderPosition,
|
|
6
5
|
usePoolBalance,
|
|
7
6
|
usePoolInfo,
|
|
8
|
-
} from '@huma-finance/shared'
|
|
7
|
+
} from '@huma-finance/web-shared'
|
|
9
8
|
import React, { useCallback, useEffect } from 'react'
|
|
10
9
|
import { useDispatch } from 'react-redux'
|
|
11
10
|
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
TrancheType,
|
|
4
|
-
useTrancheVaultContractV2,
|
|
5
|
-
} from '@huma-finance/shared'
|
|
1
|
+
import { PoolInfoV2, TrancheType } from '@huma-finance/shared'
|
|
2
|
+
import { useTrancheVaultContractV2 } from '@huma-finance/web-shared'
|
|
6
3
|
import { useWeb3React } from '@web3-react/core'
|
|
7
4
|
import React, { useCallback } from 'react'
|
|
8
5
|
|
|
@@ -4,9 +4,11 @@ import {
|
|
|
4
4
|
POOL_NAME,
|
|
5
5
|
TrancheRedemptionStatus,
|
|
6
6
|
TrancheType,
|
|
7
|
+
} from '@huma-finance/shared'
|
|
8
|
+
import {
|
|
7
9
|
usePoolInfoV2,
|
|
8
10
|
usePoolUnderlyingTokenInfoV2,
|
|
9
|
-
} from '@huma-finance/shared'
|
|
11
|
+
} from '@huma-finance/web-shared'
|
|
10
12
|
import { useWeb3React } from '@web3-react/core'
|
|
11
13
|
import React, { useCallback, useEffect, useState } from 'react'
|
|
12
14
|
import { useDispatch } from 'react-redux'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { getBlockchainConfigFromChain
|
|
1
|
+
import { getBlockchainConfigFromChain } from '@huma-finance/shared'
|
|
2
|
+
import { txAtom } from '@huma-finance/web-shared'
|
|
2
3
|
import { Box, css, TextField, Typography, useTheme } from '@mui/material'
|
|
3
4
|
import {
|
|
4
5
|
BroadcastEventTypeItem,
|
|
@@ -2,9 +2,11 @@ import {
|
|
|
2
2
|
CreditStatsV2,
|
|
3
3
|
PoolInfoV2,
|
|
4
4
|
UnderlyingTokenInfo,
|
|
5
|
+
} from '@huma-finance/shared'
|
|
6
|
+
import {
|
|
5
7
|
usePoolSafeAllowanceV2,
|
|
6
8
|
useReceivableInfoV2,
|
|
7
|
-
} from '@huma-finance/shared'
|
|
9
|
+
} from '@huma-finance/web-shared'
|
|
8
10
|
import { useWeb3React } from '@web3-react/core'
|
|
9
11
|
import { BigNumber, ethers } from 'ethers'
|
|
10
12
|
import React, { useCallback, useEffect, useState } from 'react'
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { PoolInfoV2, TxStateType } from '@huma-finance/shared'
|
|
1
2
|
import {
|
|
2
|
-
PoolInfoV2,
|
|
3
3
|
sendTxAtom,
|
|
4
4
|
txAtom,
|
|
5
|
-
TxStateType,
|
|
6
5
|
useReceivableContractV2,
|
|
7
|
-
} from '@huma-finance/shared'
|
|
6
|
+
} from '@huma-finance/web-shared'
|
|
8
7
|
import { useWeb3React } from '@web3-react/core'
|
|
9
8
|
import { useAtom } from 'jotai'
|
|
10
9
|
import { useResetAtom } from 'jotai/utils'
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { CreditStateV2, POOL_NAME } from '@huma-finance/shared'
|
|
1
2
|
import {
|
|
2
|
-
CreditStateV2,
|
|
3
|
-
POOL_NAME,
|
|
4
3
|
useCreditStatsV2,
|
|
5
4
|
usePoolInfoV2,
|
|
6
5
|
usePoolUnderlyingTokenInfoV2,
|
|
7
|
-
} from '@huma-finance/shared'
|
|
6
|
+
} from '@huma-finance/web-shared'
|
|
8
7
|
import { useWeb3React } from '@web3-react/core'
|
|
9
8
|
import React, { useCallback, useEffect } from 'react'
|
|
10
9
|
import { useDispatch } from 'react-redux'
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
toBigNumber,
|
|
4
4
|
UnderlyingTokenInfo,
|
|
5
5
|
upScale,
|
|
6
|
-
usePoolSafeAllowanceV2,
|
|
7
6
|
} from '@huma-finance/shared'
|
|
7
|
+
import { usePoolSafeAllowanceV2 } from '@huma-finance/web-shared'
|
|
8
8
|
import { useWeb3React } from '@web3-react/core'
|
|
9
9
|
import { BigNumber, ethers } from 'ethers'
|
|
10
10
|
import React, { useCallback, useState } from 'react'
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { PoolInfoV2, TxStateType } from '@huma-finance/shared'
|
|
1
2
|
import {
|
|
2
|
-
PoolInfoV2,
|
|
3
3
|
sendTxAtom,
|
|
4
4
|
txAtom,
|
|
5
|
-
TxStateType,
|
|
6
5
|
useReceivableContractV2,
|
|
7
|
-
} from '@huma-finance/shared'
|
|
6
|
+
} from '@huma-finance/web-shared'
|
|
8
7
|
import { useWeb3React } from '@web3-react/core'
|
|
9
8
|
import { useAtom } from 'jotai'
|
|
10
9
|
import { useResetAtom } from 'jotai/utils'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { POOL_NAME } from '@huma-finance/shared'
|
|
1
2
|
import {
|
|
2
|
-
POOL_NAME,
|
|
3
3
|
useCreditStatsV2,
|
|
4
4
|
usePoolInfoV2,
|
|
5
5
|
usePoolUnderlyingTokenInfoV2,
|
|
6
6
|
useReceivableInfoV2,
|
|
7
|
-
} from '@huma-finance/shared'
|
|
7
|
+
} from '@huma-finance/web-shared'
|
|
8
8
|
import { useWeb3React } from '@web3-react/core'
|
|
9
9
|
import { BigNumber, ethers } from 'ethers'
|
|
10
10
|
import React, { useEffect, useState } from 'react'
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
PoolInfoType,
|
|
4
4
|
toBigNumber,
|
|
5
5
|
upScale,
|
|
6
|
-
useFeeManager,
|
|
7
6
|
} from '@huma-finance/shared'
|
|
7
|
+
import { useFeeManager } from '@huma-finance/web-shared'
|
|
8
8
|
import React, { useCallback, useState } from 'react'
|
|
9
9
|
|
|
10
10
|
import { useWeb3React } from '@web3-react/core'
|
|
@@ -2,9 +2,8 @@ import {
|
|
|
2
2
|
PoolInfoType,
|
|
3
3
|
SuperfluidPoolProcessor,
|
|
4
4
|
SuperfluidPoolProcessor_ABI,
|
|
5
|
-
useERC2612Permit,
|
|
6
|
-
useMount,
|
|
7
5
|
} from '@huma-finance/shared'
|
|
6
|
+
import { useERC2612Permit, useMount } from '@huma-finance/web-shared'
|
|
8
7
|
import { BigNumber, Contract, ethers } from 'ethers'
|
|
9
8
|
import React from 'react'
|
|
10
9
|
import { useDispatch } from 'react-redux'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { PoolInfoType
|
|
1
|
+
import { PoolInfoType } from '@huma-finance/shared'
|
|
2
|
+
import { useMultiSendContract } from '@huma-finance/web-shared'
|
|
2
3
|
import React, { useCallback } from 'react'
|
|
3
4
|
|
|
4
5
|
import { useWeb3React } from '@web3-react/core'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useWeb3React } from '@web3-react/core'
|
|
2
|
-
import { POOL_NAME, POOL_TYPE
|
|
2
|
+
import { POOL_NAME, POOL_TYPE } from '@huma-finance/shared'
|
|
3
|
+
import { usePoolInfo } from '@huma-finance/web-shared'
|
|
3
4
|
import React, { useEffect } from 'react'
|
|
4
5
|
import { useDispatch } from 'react-redux'
|
|
5
6
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useWeb3React } from '@web3-react/core'
|
|
2
|
-
import { PoolInfoType
|
|
2
|
+
import { PoolInfoType } from '@huma-finance/shared'
|
|
3
|
+
import { useAccountStats } from '@huma-finance/web-shared'
|
|
3
4
|
import React, { useEffect } from 'react'
|
|
4
5
|
import { useDispatch } from 'react-redux'
|
|
5
6
|
|
|
@@ -27,12 +28,14 @@ export function StreamFactoringPayment({
|
|
|
27
28
|
handleSuccess,
|
|
28
29
|
}: Props): React.ReactElement | null {
|
|
29
30
|
const dispatch = useDispatch()
|
|
30
|
-
const { account } = useWeb3React()
|
|
31
|
+
const { account, chainId, provider } = useWeb3React()
|
|
31
32
|
const { step, errorMessage } = useAppSelector(selectWidgetState)
|
|
32
33
|
const [{ creditRecord }] = useAccountStats(
|
|
33
34
|
poolInfo.poolName,
|
|
34
35
|
poolInfo.poolType,
|
|
36
|
+
chainId,
|
|
35
37
|
account,
|
|
38
|
+
provider,
|
|
36
39
|
)
|
|
37
40
|
|
|
38
41
|
useEffect(() => {
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { useWeb3React } from '@web3-react/core'
|
|
2
2
|
import { Contract } from 'ethers'
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
sendTxAtom,
|
|
6
|
-
TxStateType,
|
|
7
|
-
useMount,
|
|
8
|
-
usePoolContract,
|
|
9
|
-
} from '@huma-finance/shared'
|
|
3
|
+
import { PoolInfoType, TxStateType } from '@huma-finance/shared'
|
|
4
|
+
import { sendTxAtom, useMount, usePoolContract } from '@huma-finance/web-shared'
|
|
10
5
|
import { useAtom } from 'jotai'
|
|
11
6
|
import React, { useEffect } from 'react'
|
|
12
7
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TxStateType } from '@huma-finance/shared'
|
|
2
|
+
import { sendTxAtom, useMount } from '@huma-finance/web-shared'
|
|
2
3
|
import { useWeb3React } from '@web3-react/core'
|
|
3
4
|
import { Contract } from 'ethers'
|
|
4
5
|
import { useAtom } from 'jotai'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { isTxFailed
|
|
1
|
+
import { isTxFailed } from '@huma-finance/shared'
|
|
2
|
+
import { sendTxAtom, txAtom } from '@huma-finance/web-shared'
|
|
2
3
|
import { useAtom } from 'jotai'
|
|
3
4
|
import { useResetAtom } from 'jotai/utils'
|
|
4
5
|
import React, { useCallback, useEffect } from 'react'
|
package/src/hooks/useEA.ts
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
EARejectMessage,
|
|
6
6
|
EARejectReason,
|
|
7
7
|
EAService,
|
|
8
|
-
useAuthErrorHandling,
|
|
9
8
|
} from '@huma-finance/shared'
|
|
9
|
+
import { useAuthErrorHandling } from '@huma-finance/web-shared'
|
|
10
10
|
import { useWeb3React } from '@web3-react/core'
|
|
11
11
|
import { useCallback } from 'react'
|
|
12
12
|
|
package/src/index.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { JsonRpcProvider } from '@ethersproject/providers'
|
|
|
2
2
|
import {
|
|
3
3
|
Provider as Web3Provider,
|
|
4
4
|
ProviderProps as Web3Props,
|
|
5
|
-
} from '@huma-finance/shared'
|
|
5
|
+
} from '@huma-finance/web-shared'
|
|
6
6
|
import { ThemeProvider } from '@mui/material'
|
|
7
7
|
import { Provider as Eip1193Provider } from '@web3-react/types'
|
|
8
8
|
import { Provider as AtomProvider } from 'jotai'
|