@huma-finance/widgets 0.0.48-beta.303 → 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huma-finance/widgets",
|
|
3
|
-
"version": "0.0.48-beta.
|
|
3
|
+
"version": "0.0.48-beta.305+5ff3b81",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -30,8 +30,8 @@
|
|
|
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.48-beta.
|
|
34
|
-
"@huma-finance/shared": "^0.0.48-beta.
|
|
33
|
+
"@huma-finance/sdk": "^0.0.48-beta.305+5ff3b81",
|
|
34
|
+
"@huma-finance/shared": "^0.0.48-beta.305+5ff3b81",
|
|
35
35
|
"@mui/icons-material": "^5.3.0",
|
|
36
36
|
"@mui/material": "^5.0.6",
|
|
37
37
|
"@mui/styles": "^5.0.2",
|
|
@@ -193,5 +193,5 @@
|
|
|
193
193
|
"optionalDependencies": {
|
|
194
194
|
"encoding": "^0.1.13"
|
|
195
195
|
},
|
|
196
|
-
"gitHead": "
|
|
196
|
+
"gitHead": "5ff3b815713986c70f57bd87ba669156ccfaa098"
|
|
197
197
|
}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
checkIsDev,
|
|
3
|
-
getBlockchainConfigFromChain,
|
|
4
|
-
txAtom,
|
|
5
|
-
} from '@huma-finance/shared'
|
|
1
|
+
import { getBlockchainConfigFromChain, txAtom } from '@huma-finance/shared'
|
|
6
2
|
import { Box, css, TextField, Typography, useTheme } from '@mui/material'
|
|
7
3
|
import {
|
|
8
4
|
BroadcastEventTypeItem,
|
|
@@ -95,7 +91,7 @@ export function NotifiSubscriptionModal({
|
|
|
95
91
|
const [isLoading, setIsLoading] = useState<boolean>(false)
|
|
96
92
|
const [emailAddress, setEmailAddress] = useState<string>('')
|
|
97
93
|
const [emailValid, setEmailValid] = useState<boolean>()
|
|
98
|
-
const { notifiClient } = useNotifiClient(account, chainId
|
|
94
|
+
const { notifiClient } = useNotifiClient(account, chainId)
|
|
99
95
|
|
|
100
96
|
const signMessage: Uint8SignMessageFunction = async (
|
|
101
97
|
message: Uint8Array,
|
package/src/hooks/useNotifi.ts
CHANGED
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
checkIsDev,
|
|
4
4
|
doesChainSupportNotifi,
|
|
5
5
|
getBlockchainConfigFromChain,
|
|
6
|
-
getNotifiDappId,
|
|
7
6
|
} from '@huma-finance/shared'
|
|
8
7
|
import {
|
|
9
8
|
NotifiFrontendClient,
|
|
@@ -34,7 +33,6 @@ export const useDoesChainSupportNotifi = (
|
|
|
34
33
|
export const useNotifiClient = (
|
|
35
34
|
account: string | undefined,
|
|
36
35
|
chainId: number | undefined,
|
|
37
|
-
isDev: boolean,
|
|
38
36
|
) => {
|
|
39
37
|
const [notifiClient, setNotifiClient] = useState<NotifiFrontendClient | null>(
|
|
40
38
|
null,
|
|
@@ -46,8 +44,8 @@ export const useNotifiClient = (
|
|
|
46
44
|
if (account != null && chainId != null && notifiChainSupported) {
|
|
47
45
|
const client = newFrontendClient({
|
|
48
46
|
account: { publicKey: account },
|
|
49
|
-
tenantId:
|
|
50
|
-
env:
|
|
47
|
+
tenantId: 'humafinanceprod',
|
|
48
|
+
env: 'Production',
|
|
51
49
|
walletBlockchain: getBlockchainConfigFromChain(chainId),
|
|
52
50
|
})
|
|
53
51
|
await client.initialize()
|
|
@@ -56,7 +54,7 @@ export const useNotifiClient = (
|
|
|
56
54
|
}
|
|
57
55
|
|
|
58
56
|
createNotifiClient()
|
|
59
|
-
}, [account, chainId,
|
|
57
|
+
}, [account, chainId, notifiChainSupported])
|
|
60
58
|
|
|
61
59
|
return { notifiClient }
|
|
62
60
|
}
|
|
@@ -66,7 +64,7 @@ export const useIsFirstTimeNotifiUser = (
|
|
|
66
64
|
chainId: number | undefined,
|
|
67
65
|
) => {
|
|
68
66
|
const [isFirstTimeNotifiUser, setIsFirstTimeNotifiUser] = useState(false)
|
|
69
|
-
const { notifiClient } = useNotifiClient(account, chainId
|
|
67
|
+
const { notifiClient } = useNotifiClient(account, chainId)
|
|
70
68
|
const { notifiChainSupported } = useDoesChainSupportNotifi(account, chainId)
|
|
71
69
|
|
|
72
70
|
useEffect(() => {
|