@rango-dev/widget-embedded 0.57.1-next.3 → 0.57.1-next.5
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": "@rango-dev/widget-embedded",
|
|
3
|
-
"version": "0.57.1-next.
|
|
3
|
+
"version": "0.57.1-next.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@lingui/core": "4.2.1",
|
|
26
26
|
"@lingui/react": "4.2.1",
|
|
27
27
|
"@rango-dev/logging-core": "^0.12.1",
|
|
28
|
-
"@rango-dev/provider-all": "^0.59.1-next.
|
|
28
|
+
"@rango-dev/provider-all": "^0.59.1-next.4",
|
|
29
29
|
"@rango-dev/queue-manager-core": "^0.33.0",
|
|
30
30
|
"@rango-dev/queue-manager-rango-preset": "^0.59.1-next.1",
|
|
31
31
|
"@rango-dev/queue-manager-react": "^0.33.0",
|
|
@@ -37,11 +37,14 @@ export function useSyncUrlAndStore() {
|
|
|
37
37
|
const liquiditySourcesParamsRef = useRef<string>();
|
|
38
38
|
const { findToken } = useAppStore();
|
|
39
39
|
const getUrlSearchParams = () => {
|
|
40
|
-
const
|
|
40
|
+
const extraQueryParams: Record<string, string> = {};
|
|
41
41
|
|
|
42
42
|
for (const [key, value] of searchParams.entries()) {
|
|
43
|
-
if (
|
|
44
|
-
|
|
43
|
+
if (
|
|
44
|
+
key.startsWith('utm_') ||
|
|
45
|
+
key.startsWith('privy_') //these parameters are a required component of Privy’s OAuth login flow https://docs.privy.io/recipes/react/cookies#middleware-setup
|
|
46
|
+
) {
|
|
47
|
+
extraQueryParams[key] = value;
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
const fromAmount = searchParams.get(SearchParams.FROM_AMOUNT);
|
|
@@ -64,7 +67,7 @@ export function useSyncUrlAndStore() {
|
|
|
64
67
|
autoConnect,
|
|
65
68
|
clientUrl,
|
|
66
69
|
liquiditySources,
|
|
67
|
-
|
|
70
|
+
extraQueryParams,
|
|
68
71
|
blockchain,
|
|
69
72
|
};
|
|
70
73
|
};
|
|
@@ -81,7 +84,7 @@ export function useSyncUrlAndStore() {
|
|
|
81
84
|
};
|
|
82
85
|
|
|
83
86
|
useEffect(() => {
|
|
84
|
-
const { autoConnect, clientUrl,
|
|
87
|
+
const { autoConnect, clientUrl, extraQueryParams, blockchain } =
|
|
85
88
|
getUrlSearchParams();
|
|
86
89
|
|
|
87
90
|
if (isInRouterContext && fetchMetaStatus === 'success') {
|
|
@@ -97,7 +100,7 @@ export function useSyncUrlAndStore() {
|
|
|
97
100
|
[SearchParams.LIQUIDITY_SOURCES]: campaignMode
|
|
98
101
|
? liquiditySourcesParamsRef.current
|
|
99
102
|
: undefined,
|
|
100
|
-
...
|
|
103
|
+
...extraQueryParams,
|
|
101
104
|
});
|
|
102
105
|
}
|
|
103
106
|
}, [
|