@silentswap/react 0.0.80 → 0.0.81
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.
|
@@ -93,18 +93,13 @@ export const OrdersProvider = ({ children, baseUrl: baseUrlProp }) => {
|
|
|
93
93
|
try {
|
|
94
94
|
const { config } = useSilentSwap();
|
|
95
95
|
baseUrl = config.baseUrl;
|
|
96
|
-
console.log('[OrdersContext] Using baseUrl from context:', baseUrl);
|
|
97
96
|
}
|
|
98
|
-
catch
|
|
97
|
+
catch {
|
|
99
98
|
// Context not available (e.g., during SSR)
|
|
100
99
|
// Orders won't be fetched until context is available
|
|
101
100
|
baseUrl = undefined;
|
|
102
|
-
console.warn('[OrdersContext] Context not available, skipping order fetching');
|
|
103
101
|
}
|
|
104
102
|
}
|
|
105
|
-
else {
|
|
106
|
-
console.log('[OrdersContext] Using baseUrl from prop:', baseUrl);
|
|
107
|
-
}
|
|
108
103
|
// Fetch recent orders from API (matches Svelte implementation)
|
|
109
104
|
const request_recent_orders = useCallback(async (sb58_auth_view) => {
|
|
110
105
|
if (!baseUrl) {
|
|
@@ -293,6 +293,9 @@ export function createOrderTrackingManager(apiRef) {
|
|
|
293
293
|
if (getApi().isKeyActive(key)) {
|
|
294
294
|
const prev = getApi().getStateForKey(key) ?? DEFAULT_ORDER_TRACKING_STATE;
|
|
295
295
|
getApi().setStateForKey(key, { ...prev, isConnected: false });
|
|
296
|
+
// Don't reconnect if the order is already complete (all outputs FINALIZED)
|
|
297
|
+
if (prev.isComplete)
|
|
298
|
+
return;
|
|
296
299
|
const idle = Date.now() - conn.lastReceived > 90_000;
|
|
297
300
|
if (idle) {
|
|
298
301
|
reconnectTimeoutRef.current = setTimeout(() => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silentswap/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.81",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@bigmi/core": "^0.6.5",
|
|
26
26
|
"@ensdomains/ensjs": "^4.2.0",
|
|
27
|
-
"@silentswap/sdk": "0.0.
|
|
28
|
-
"@silentswap/ui-kit": "0.0.
|
|
27
|
+
"@silentswap/sdk": "0.0.81",
|
|
28
|
+
"@silentswap/ui-kit": "0.0.81",
|
|
29
29
|
"@solana/codecs-strings": "^5.1.0",
|
|
30
30
|
"@solana/kit": "^5.1.0",
|
|
31
31
|
"@solana/rpc": "^5.1.0",
|