@diviswap/sdk 1.7.15 → 1.7.16
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/dist/cli/index.js
CHANGED
|
@@ -421,12 +421,17 @@ const getHandlers: Record<string, ResourceHandler> = {
|
|
|
421
421
|
|
|
422
422
|
const chain_id = searchParams.get('chain_id');
|
|
423
423
|
const is_default = searchParams.get('is_default');
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
424
|
+
|
|
425
|
+
let addresses = await liberex.addresses.list();
|
|
426
|
+
|
|
427
|
+
// Filter client-side if params provided
|
|
428
|
+
if (chain_id) {
|
|
429
|
+
addresses = addresses.filter(addr => addr.chain_id === Number(chain_id));
|
|
430
|
+
}
|
|
431
|
+
if (is_default !== null) {
|
|
432
|
+
addresses = addresses.filter(addr => addr.is_default === (is_default === 'true'));
|
|
433
|
+
}
|
|
434
|
+
|
|
430
435
|
return NextResponse.json(addresses);
|
|
431
436
|
},
|
|
432
437
|
|
package/package.json
CHANGED
|
@@ -421,12 +421,17 @@ const getHandlers: Record<string, ResourceHandler> = {
|
|
|
421
421
|
|
|
422
422
|
const chain_id = searchParams.get('chain_id');
|
|
423
423
|
const is_default = searchParams.get('is_default');
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
424
|
+
|
|
425
|
+
let addresses = await liberex.addresses.list();
|
|
426
|
+
|
|
427
|
+
// Filter client-side if params provided
|
|
428
|
+
if (chain_id) {
|
|
429
|
+
addresses = addresses.filter(addr => addr.chain_id === Number(chain_id));
|
|
430
|
+
}
|
|
431
|
+
if (is_default !== null) {
|
|
432
|
+
addresses = addresses.filter(addr => addr.is_default === (is_default === 'true'));
|
|
433
|
+
}
|
|
434
|
+
|
|
430
435
|
return NextResponse.json(addresses);
|
|
431
436
|
},
|
|
432
437
|
|