@huma-finance/widgets 0.0.48-beta.302 → 0.0.48-beta.305
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/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
2
|
-
import { txAtom, useMQ, supportedChainId, sendTxAtom, isTxFailed, getExplorerUrl, openInNewTab, usePoolUnderlyingTokenContract, TxStateType, useMount, decodeLogs, ERC20_ABI, downScale, formatMoney, POOL_NAME, POOL_TYPE, usePoolInfo, useAccountStats, getERC20Contract, usePoolInfoV2, usePoolUnderlyingTokenInfoV2, usePoolSafeAllowanceV2, useAuthErrorHandling, checkIsDev, EAService, EARejectionError, EARejectMessage, EARejectReason, useCLFeeManager, useCLPoolAllowance, usePoolContract, timeUtil, formatNumber, doesChainSupportNotifi,
|
|
2
|
+
import { txAtom, useMQ, supportedChainId, sendTxAtom, isTxFailed, getExplorerUrl, openInNewTab, usePoolUnderlyingTokenContract, TxStateType, useMount, decodeLogs, ERC20_ABI, downScale, formatMoney, POOL_NAME, POOL_TYPE, usePoolInfo, useAccountStats, getERC20Contract, usePoolInfoV2, usePoolUnderlyingTokenInfoV2, usePoolSafeAllowanceV2, useAuthErrorHandling, checkIsDev, EAService, EARejectionError, EARejectMessage, EARejectReason, useCLFeeManager, useCLPoolAllowance, usePoolContract, timeUtil, formatNumber, doesChainSupportNotifi, getBlockchainConfigFromChain, CreditState, useCreditContractV2, useCreditStatsV2, CreditStateV2, upScale, toBigNumber, TRANSFER_ABI, FirstLossCoverIndex, useFirstLossCoverContractV2, useFirstLossCoverRequirementV2, useFirstLossCoverAllowanceV2, useFeeManager, combineStyles, isEmpty, useInvoiceNFTContract, useRFPoolAllowance, useTrancheVaultContractV2, getTrancheAssetsAndShares, useCancellableRedemptionInfoV2, useParamsSearch, IdentityService, CHAINS, configUtil, usePoolAllowance, useLenderApproved, useLenderPosition, useWithdrawlLockoutInSeconds, usePoolUnderlyingTokenBalance, usePoolUnderlyingTokenBalanceV2, useLenderApprovedV2, useLastDepositTime, formatAmount, getTrancheVaultContractV2, getTrancheRedemptionStatusV2, getPoolContractV2, useReceivableInfoV2, useReceivableContractV2, CURRENCY_CODE, CreditEventText, useERC2612Permit, ERC2612_ABI, SuperfluidPoolProcessor_ABI, useMultiSendContract, usePoolUnderlyingToken, hasRFActiveLoan, timestampToLL, getWalletAddressAbbr, useFactoring, PoolMap, PoolSubgraphMap, CreditEvent, Provider as Provider$1 } from '@huma-finance/shared';
|
|
3
3
|
import { useTheme, css, Box, Typography, Tooltip, Button, Dialog, Slider, Input, Divider, TextField, FormControl, FormLabel, RadioGroup, FormControlLabel, Radio, Snackbar, Alert, Skeleton, TablePagination, LinearProgress, createTheme, ThemeProvider } from '@mui/material';
|
|
4
4
|
import { useAtom, Provider as Provider$2 } from 'jotai';
|
|
5
5
|
import * as React from 'react';
|
|
@@ -2619,7 +2619,7 @@ const useDoesChainSupportNotifi = (account, chainId) => {
|
|
|
2619
2619
|
notifiChainSupported
|
|
2620
2620
|
};
|
|
2621
2621
|
};
|
|
2622
|
-
const useNotifiClient = (account, chainId
|
|
2622
|
+
const useNotifiClient = (account, chainId) => {
|
|
2623
2623
|
const [notifiClient, setNotifiClient] = useState(null);
|
|
2624
2624
|
const {
|
|
2625
2625
|
notifiChainSupported
|
|
@@ -2631,8 +2631,8 @@ const useNotifiClient = (account, chainId, isDev) => {
|
|
|
2631
2631
|
account: {
|
|
2632
2632
|
publicKey: account
|
|
2633
2633
|
},
|
|
2634
|
-
tenantId:
|
|
2635
|
-
env:
|
|
2634
|
+
tenantId: 'humafinanceprod',
|
|
2635
|
+
env: 'Production',
|
|
2636
2636
|
walletBlockchain: getBlockchainConfigFromChain(chainId)
|
|
2637
2637
|
});
|
|
2638
2638
|
await client.initialize();
|
|
@@ -2640,7 +2640,7 @@ const useNotifiClient = (account, chainId, isDev) => {
|
|
|
2640
2640
|
}
|
|
2641
2641
|
};
|
|
2642
2642
|
createNotifiClient();
|
|
2643
|
-
}, [account, chainId,
|
|
2643
|
+
}, [account, chainId, notifiChainSupported]);
|
|
2644
2644
|
return {
|
|
2645
2645
|
notifiClient
|
|
2646
2646
|
};
|
|
@@ -2649,7 +2649,7 @@ const useIsFirstTimeNotifiUser = (account, chainId) => {
|
|
|
2649
2649
|
const [isFirstTimeNotifiUser, setIsFirstTimeNotifiUser] = useState(false);
|
|
2650
2650
|
const {
|
|
2651
2651
|
notifiClient
|
|
2652
|
-
} = useNotifiClient(account, chainId
|
|
2652
|
+
} = useNotifiClient(account, chainId);
|
|
2653
2653
|
const {
|
|
2654
2654
|
notifiChainSupported
|
|
2655
2655
|
} = useDoesChainSupportNotifi(account, chainId);
|
|
@@ -2733,7 +2733,7 @@ function NotifiSubscriptionModal(_ref) {
|
|
|
2733
2733
|
const [emailValid, setEmailValid] = useState();
|
|
2734
2734
|
const {
|
|
2735
2735
|
notifiClient
|
|
2736
|
-
} = useNotifiClient(account, chainId
|
|
2736
|
+
} = useNotifiClient(account, chainId);
|
|
2737
2737
|
const signMessage = async message => {
|
|
2738
2738
|
const signer = provider.getSigner();
|
|
2739
2739
|
const signature = await signer.signMessage(Buffer.from(message));
|