@phygitallabs/tapquest-core 6.7.6 → 6.7.8
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/bun.lock +7 -7
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/providers/ServicesProvider.tsx +18 -5
package/package.json
CHANGED
|
@@ -38,6 +38,16 @@ export const ServicesProvider: React.FC<ServicesProviderProps> = ({
|
|
|
38
38
|
const { environment, version } = apiConfig;
|
|
39
39
|
const [commonServiceConfig, setCommonServiceConfig] = useState<ServiceConfig | null>(null);
|
|
40
40
|
|
|
41
|
+
const [deviceUid, setDeviceUid] = useState<string>("");
|
|
42
|
+
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
const initDeviceUid = async () => {
|
|
45
|
+
const deviceUid = await checkDeviceUid();
|
|
46
|
+
setDeviceUid(deviceUid);
|
|
47
|
+
}
|
|
48
|
+
initDeviceUid();
|
|
49
|
+
}, []);
|
|
50
|
+
|
|
41
51
|
// Init client
|
|
42
52
|
useEffect(() => {
|
|
43
53
|
const initClient = async () => {
|
|
@@ -132,11 +142,14 @@ export const ServicesProvider: React.FC<ServicesProviderProps> = ({
|
|
|
132
142
|
baseURL={`${serviceApiUrl[environment].API_GENERATE_CERTIFICATE_URL}/v1`}
|
|
133
143
|
>
|
|
134
144
|
<PhygitalConsentProvider
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
145
|
+
{...commonServiceConfig}
|
|
146
|
+
deviceId={deviceUid}
|
|
147
|
+
baseURL={`${serviceApiUrl[environment].API_CONSENT_URL}/v1`}
|
|
148
|
+
axiosConfig={{
|
|
149
|
+
headers: {
|
|
150
|
+
"Content-Type": "application/json",
|
|
151
|
+
}
|
|
152
|
+
}}
|
|
140
153
|
>
|
|
141
154
|
{children}
|
|
142
155
|
</PhygitalConsentProvider>
|