@huma-finance/widgets 0.0.59-beta.472 → 0.0.59-beta.479

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huma-finance/widgets",
3
- "version": "0.0.59-beta.472+871af0d",
3
+ "version": "0.0.59-beta.479+1aff638",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -30,14 +30,14 @@
30
30
  "@ethersproject/experimental": "^5.7.0",
31
31
  "@ethersproject/providers": "^5.6.0",
32
32
  "@ethersproject/units": "^5.6.0",
33
- "@huma-finance/sdk": "^0.0.59-beta.472+871af0d",
34
- "@huma-finance/shared": "^0.0.59-beta.472+871af0d",
33
+ "@huma-finance/sdk": "^0.0.59-beta.479+1aff638",
34
+ "@huma-finance/shared": "^0.0.59-beta.479+1aff638",
35
35
  "@mui/icons-material": "^5.3.0",
36
36
  "@mui/material": "^5.0.6",
37
37
  "@mui/styles": "^5.0.2",
38
38
  "@mui/system": "^5.0.6",
39
39
  "@mui/x-date-pickers": "^5.0.7",
40
- "@notifi-network/notifi-frontend-client": "^0.75.1",
40
+ "@notifi-network/notifi-frontend-client": "^0.91.1",
41
41
  "@reduxjs/toolkit": "^1.8.6",
42
42
  "@types/utf8": "^3.0.1",
43
43
  "@walletconnect/ethereum-provider": "1.8.0",
@@ -193,5 +193,5 @@
193
193
  "optionalDependencies": {
194
194
  "encoding": "^0.1.13"
195
195
  },
196
- "gitHead": "871af0dd63df91d70a27322936764aa6a5ee5197"
196
+ "gitHead": "1aff638b34ec07f624a32169a60468da63dada43"
197
197
  }
@@ -64,7 +64,7 @@ export function CreditLineBorrow({
64
64
  provider,
65
65
  )
66
66
  const { isFirstTimeNotifiUser } = useIsFirstTimeNotifiUser(account, chainId)
67
- const { notifiChainSupported } = useDoesChainSupportNotifi(account, chainId)
67
+ const { notifiChainSupported } = useDoesChainSupportNotifi(chainId)
68
68
  const { creditRecord } = accountStats
69
69
  const accountState = creditRecord?.state
70
70
 
@@ -56,7 +56,7 @@ export function CreditLineBorrowV2({
56
56
  provider,
57
57
  )
58
58
  const { isFirstTimeNotifiUser } = useIsFirstTimeNotifiUser(account, chainId)
59
- const { notifiChainSupported } = useDoesChainSupportNotifi(account, chainId)
59
+ const { notifiChainSupported } = useDoesChainSupportNotifi(chainId)
60
60
  const { creditRecord } = accountStats
61
61
  const accountState = creditRecord?.state
62
62
 
@@ -66,7 +66,7 @@ export function LendSupply({
66
66
  provider,
67
67
  )
68
68
  const { isFirstTimeNotifiUser } = useIsFirstTimeNotifiUser(account, chainId)
69
- const { notifiChainSupported } = useDoesChainSupportNotifi(account, chainId)
69
+ const { notifiChainSupported } = useDoesChainSupportNotifi(chainId)
70
70
  const [lenderApproved, refreshLenderApproved] = useLenderApproved(
71
71
  poolName,
72
72
  poolType,
@@ -37,7 +37,7 @@ export function Success({
37
37
  const { symbol, decimals, address } = poolUnderlyingToken
38
38
  const [supplyAmount, setSupplyAmount] = useState<string | undefined>()
39
39
  const { isFirstTimeNotifiUser } = useIsFirstTimeNotifiUser(account, chainId)
40
- const { notifiChainSupported } = useDoesChainSupportNotifi(account, chainId)
40
+ const { notifiChainSupported } = useDoesChainSupportNotifi(chainId)
41
41
  const hasNextStep = isFirstTimeNotifiUser
42
42
 
43
43
  useEffect(() => {
@@ -59,7 +59,7 @@ export function ReceivableBackedCreditLineBorrowV2({
59
59
  provider,
60
60
  )
61
61
  const { isFirstTimeNotifiUser } = useIsFirstTimeNotifiUser(account, chainId)
62
- const { notifiChainSupported } = useDoesChainSupportNotifi(account, chainId)
62
+ const { notifiChainSupported } = useDoesChainSupportNotifi(chainId)
63
63
  const { creditRecord } = accountStats
64
64
  const accountState = creditRecord?.state
65
65
 
@@ -9,23 +9,18 @@ import {
9
9
  newFrontendClient,
10
10
  } from '@notifi-network/notifi-frontend-client'
11
11
 
12
- export const useDoesChainSupportNotifi = (
13
- account: string | undefined,
14
- chainId: number | undefined,
15
- ) => {
12
+ export const useDoesChainSupportNotifi = (chainId: number | undefined) => {
16
13
  const [notifiChainSupported, setNotifiChainSupported] = useState(false)
17
14
 
18
15
  useEffect(() => {
19
16
  const checkNotifiChainSupported = async () => {
20
- if (account != null && chainId != null) {
21
- setNotifiChainSupported(
22
- doesChainSupportNotifi(chainId, checkIsDev(), account),
23
- )
17
+ if (chainId != null) {
18
+ setNotifiChainSupported(doesChainSupportNotifi(chainId, checkIsDev()))
24
19
  }
25
20
  }
26
21
 
27
22
  checkNotifiChainSupported()
28
- }, [account, chainId])
23
+ }, [chainId])
29
24
 
30
25
  return { notifiChainSupported }
31
26
  }
@@ -37,7 +32,7 @@ export const useNotifiClient = (
37
32
  const [notifiClient, setNotifiClient] = useState<NotifiFrontendClient | null>(
38
33
  null,
39
34
  )
40
- const { notifiChainSupported } = useDoesChainSupportNotifi(account, chainId)
35
+ const { notifiChainSupported } = useDoesChainSupportNotifi(chainId)
41
36
 
42
37
  useEffect(() => {
43
38
  const createNotifiClient = async () => {
@@ -65,7 +60,7 @@ export const useIsFirstTimeNotifiUser = (
65
60
  ) => {
66
61
  const [isFirstTimeNotifiUser, setIsFirstTimeNotifiUser] = useState(false)
67
62
  const { notifiClient } = useNotifiClient(account, chainId)
68
- const { notifiChainSupported } = useDoesChainSupportNotifi(account, chainId)
63
+ const { notifiChainSupported } = useDoesChainSupportNotifi(chainId)
69
64
 
70
65
  useEffect(() => {
71
66
  const checkIsFirstTimeNotifiUser = async () => {