@huma-finance/widgets 0.0.43-beta.109 → 0.0.43-beta.112

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,4 +1,4 @@
1
- import { txAtom, useMQ, supportedChainId, sendTxAtom, isTxFailed, getExplorerUrl, openInNewTab, usePoolUnderlyingTokenContract, TxStateType, useMount, decodeLogs, ERC20_ABI, downScale, formatMoney, POOL_NAME, POOL_TYPE, usePoolInfo, useAccountStats, useAuthErrorHandling, EARejectionError, EARejectMessage, EARejectReason, EAService, useCLFeeManager, useCLPoolAllowance, upScale, usePoolContract, timeUtil, getNotifiDappId, getBlockchainConfigFromChain, doesChainSupportNotifi, CreditState, toBigNumber, TRANSFER_ABI, useFeeManager, combineStyles, isEmpty, useInvoiceNFTContract, useRFPoolAllowance, useParamsSearch, IdentityService, CHAINS, configUtil, usePoolAllowance, useLenderApproved, useLenderPosition, useWithdrawlLockoutInSeconds, usePoolUnderlyingTokenBalance, useLastDepositTime, CreditEventText, useERC2612Permit, ERC2612_ABI, SuperfluidPoolProcessor_ABI, useMultiSendContract, usePoolUnderlyingToken, hasRFActiveLoan, timestampToLL, getWalletAddressAbbr, useFactoring, PoolMap, PoolSubgraphMap, CreditEvent, Provider as Provider$1 } from '@huma-finance/shared';
1
+ import { txAtom, useMQ, supportedChainId, sendTxAtom, isTxFailed, getExplorerUrl, openInNewTab, usePoolUnderlyingTokenContract, TxStateType, useMount, decodeLogs, ERC20_ABI, downScale, formatMoney, POOL_NAME, POOL_TYPE, usePoolInfo, useAccountStats, useAuthErrorHandling, checkIsDev, EARejectionError, EARejectMessage, EARejectReason, EAService, useCLFeeManager, useCLPoolAllowance, upScale, usePoolContract, timeUtil, getNotifiDappId, getBlockchainConfigFromChain, doesChainSupportNotifi, CreditState, toBigNumber, TRANSFER_ABI, useFeeManager, combineStyles, isEmpty, useInvoiceNFTContract, useRFPoolAllowance, useParamsSearch, IdentityService, CHAINS, configUtil, usePoolAllowance, useLenderApproved, useLenderPosition, useWithdrawlLockoutInSeconds, usePoolUnderlyingTokenBalance, useLastDepositTime, CreditEventText, useERC2612Permit, ERC2612_ABI, SuperfluidPoolProcessor_ABI, useMultiSendContract, usePoolUnderlyingToken, hasRFActiveLoan, timestampToLL, getWalletAddressAbbr, useFactoring, PoolMap, PoolSubgraphMap, CreditEvent, Provider as Provider$1 } from '@huma-finance/shared';
2
2
  import { useTheme, css, Box, Typography, Tooltip, Button, Dialog, Slider, Input, Divider, InputAdornment, Snackbar, Alert, Skeleton, TablePagination, LinearProgress, createTheme, ThemeProvider } from '@mui/material';
3
3
  import { useAtom, Provider as Provider$2 } from 'jotai';
4
4
  import { useSelector, useDispatch, Provider } from 'react-redux';
@@ -2354,20 +2354,13 @@ function CreditLineApprove(_ref) {
2354
2354
  });
2355
2355
  }
2356
2356
 
2357
- var checkIsDev = function checkIsDev() {
2358
- return window.location.hostname.startsWith('dev') || window.location.hostname.startsWith('deploy-preview') || process.env.NODE_ENV === 'development';
2359
- };
2360
- var envUtil = {
2361
- checkIsDev: checkIsDev
2362
- };
2363
-
2364
2357
  function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2365
2358
  function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2366
2359
  var useEA = function useEA() {
2367
2360
  var dispatch = useAppDispatch();
2368
2361
  var _useWeb3React = useWeb3React(),
2369
2362
  chainId = _useWeb3React.chainId;
2370
- var _useAuthErrorHandling = useAuthErrorHandling(envUtil.checkIsDev()),
2363
+ var _useAuthErrorHandling = useAuthErrorHandling(checkIsDev()),
2371
2364
  isWalletOwnershipVerificationRequired = _useAuthErrorHandling.isWalletOwnershipVerificationRequired,
2372
2365
  isWalletOwnershipVerified = _useAuthErrorHandling.isWalletOwnershipVerified,
2373
2366
  setAuthError = _useAuthErrorHandling.setError;
@@ -2379,7 +2372,7 @@ var useEA = function useEA() {
2379
2372
  case 0:
2380
2373
  _context.prev = 0;
2381
2374
  _context.next = 3;
2382
- return EAService.approve(payload, chainId, envUtil.checkIsDev());
2375
+ return EAService.approve(payload, chainId, checkIsDev());
2383
2376
  case 3:
2384
2377
  result = _context.sent;
2385
2378
  dispatch(setApproval(_objectSpread$3(_objectSpread$3({}, result), {}, {
@@ -3002,8 +2995,8 @@ function NotifiSubscriptionModal(_ref) {
3002
2995
  account: {
3003
2996
  publicKey: account
3004
2997
  },
3005
- tenantId: getNotifiDappId(envUtil.checkIsDev()),
3006
- env: envUtil.checkIsDev() ? 'Development' : 'Production',
2998
+ tenantId: getNotifiDappId(checkIsDev()),
2999
+ env: checkIsDev() ? 'Development' : 'Production',
3007
3000
  walletBlockchain: getBlockchainConfigFromChain(chainId)
3008
3001
  });
3009
3002
  _context.next = 4;
@@ -3222,7 +3215,7 @@ var useIsFirstTimeNotifiUser = function useIsFirstTimeNotifiUser(account, chainI
3222
3215
  publicKey: account
3223
3216
  },
3224
3217
  tenantId: 'humadapp',
3225
- env: envUtil.checkIsDev() ? 'Development' : 'Production',
3218
+ env: checkIsDev() ? 'Development' : 'Production',
3226
3219
  walletBlockchain: getBlockchainConfigFromChain(chainId)
3227
3220
  });
3228
3221
  _context.next = 4;
@@ -3277,7 +3270,7 @@ var useDoesChainSupportNotifi = function useDoesChainSupportNotifi(account, chai
3277
3270
  while (1) switch (_context2.prev = _context2.next) {
3278
3271
  case 0:
3279
3272
  if (account != null && chainId != null) {
3280
- setNotifiChainSupported(doesChainSupportNotifi(chainId, envUtil.checkIsDev(), account));
3273
+ setNotifiChainSupported(doesChainSupportNotifi(chainId, checkIsDev(), account));
3281
3274
  }
3282
3275
  case 1:
3283
3276
  case "end":
@@ -4165,7 +4158,7 @@ function EvaluationKYC(_ref) {
4165
4158
  handleClose = _ref.handleClose;
4166
4159
  var theme = useTheme();
4167
4160
  var dispatch = useAppDispatch();
4168
- var isDev = envUtil.checkIsDev();
4161
+ var isDev = checkIsDev();
4169
4162
  var _useWeb3React = useWeb3React(),
4170
4163
  account = _useWeb3React.account,
4171
4164
  chainId = _useWeb3React.chainId;