@diviswap/sdk 1.7.14 → 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
@@ -1937,7 +1937,7 @@ async function uninstall(options = {}) {
1937
1937
  }
1938
1938
 
1939
1939
  // package.json
1940
- var version = "1.7.14";
1940
+ var version = "1.7.16";
1941
1941
 
1942
1942
  // src/cli/index.ts
1943
1943
  var program = new commander.Command();
@@ -1,7 +1,7 @@
1
1
  'use server';
2
2
 
3
- import { LiberEx } from '@99darwin/liberex-sdk';
4
- import type { Transaction, Payee } from '@99darwin/liberex-sdk';
3
+ import { LiberEx } from '@diviswap/sdk';
4
+ import type { Transaction, Payee } from '@diviswap/sdk';
5
5
  import { revalidatePath } from 'next/cache';
6
6
  import { cookies } from 'next/headers';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { NextRequest, NextResponse } from 'next/server';
2
- import { LiberEx } from '@99darwin/liberex-sdk';
2
+ import { LiberEx } from '@diviswap/sdk';
3
3
  import { cookies } from 'next/headers';
4
- import type { LiberEx as LiberExType } from '@99darwin/liberex-sdk';
4
+ import type { LiberEx as LiberExType } from '@diviswap/sdk';
5
5
 
6
6
  // Initialize LiberEx SDK with partner authentication
7
7
  function getLiberEx() {
@@ -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
- const addresses = await liberex.addresses.list({
426
- ...(chain_id && { chain_id: Number(chain_id) }),
427
- ...(is_default !== null && { is_default: is_default === 'true' })
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
 
@@ -1,4 +1,4 @@
1
- import { LiberExProvider } from '@99darwin/liberex-sdk/react';
1
+ import { LiberExProvider } from '@diviswap/sdk/react';
2
2
 
3
3
  export default function LiberExLayout({
4
4
  children,
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { LiberExProvider } from '@99darwin/liberex-sdk/react';
3
+ import { LiberExProvider } from '@diviswap/sdk/react';
4
4
 
5
5
  // Wrapper to ensure client-side rendering for LiberEx components
6
6
  export function LiberExClientProvider({ children }: { children: React.ReactNode }) {
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Example:
5
5
  *
6
- * import { LiberExProvider } from '@99darwin/liberex-sdk/react';
6
+ * import { LiberExProvider } from '@diviswap/sdk/react';
7
7
  *
8
8
  * export default function RootLayout({
9
9
  * children,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { LiberExProvider, useLiberEx } from '@99darwin/liberex-sdk/react';
2
+ import { LiberExProvider, useLiberEx } from '@diviswap/sdk/react';
3
3
  import { apiClient } from './api-client';
4
4
 
5
5
  function TransactionDemo() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diviswap/sdk",
3
- "version": "1.7.14",
3
+ "version": "1.7.16",
4
4
  "description": "Official Diviswap SDK - Crypto rails made simple",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -1,7 +1,7 @@
1
1
  'use server';
2
2
 
3
- import { LiberEx } from '@99darwin/liberex-sdk';
4
- import type { Transaction, Payee } from '@99darwin/liberex-sdk';
3
+ import { LiberEx } from '@diviswap/sdk';
4
+ import type { Transaction, Payee } from '@diviswap/sdk';
5
5
  import { revalidatePath } from 'next/cache';
6
6
  import { cookies } from 'next/headers';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { NextRequest, NextResponse } from 'next/server';
2
- import { LiberEx } from '@99darwin/liberex-sdk';
2
+ import { LiberEx } from '@diviswap/sdk';
3
3
  import { cookies } from 'next/headers';
4
- import type { LiberEx as LiberExType } from '@99darwin/liberex-sdk';
4
+ import type { LiberEx as LiberExType } from '@diviswap/sdk';
5
5
 
6
6
  // Initialize LiberEx SDK with partner authentication
7
7
  function getLiberEx() {
@@ -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
- const addresses = await liberex.addresses.list({
426
- ...(chain_id && { chain_id: Number(chain_id) }),
427
- ...(is_default !== null && { is_default: is_default === 'true' })
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
 
@@ -1,4 +1,4 @@
1
- import { LiberExProvider } from '@99darwin/liberex-sdk/react';
1
+ import { LiberExProvider } from '@diviswap/sdk/react';
2
2
 
3
3
  export default function LiberExLayout({
4
4
  children,
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { LiberExProvider } from '@99darwin/liberex-sdk/react';
3
+ import { LiberExProvider } from '@diviswap/sdk/react';
4
4
 
5
5
  // Wrapper to ensure client-side rendering for LiberEx components
6
6
  export function LiberExClientProvider({ children }: { children: React.ReactNode }) {
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Example:
5
5
  *
6
- * import { LiberExProvider } from '@99darwin/liberex-sdk/react';
6
+ * import { LiberExProvider } from '@diviswap/sdk/react';
7
7
  *
8
8
  * export default function RootLayout({
9
9
  * children,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { LiberExProvider, useLiberEx } from '@99darwin/liberex-sdk/react';
2
+ import { LiberExProvider, useLiberEx } from '@diviswap/sdk/react';
3
3
  import { apiClient } from './api-client';
4
4
 
5
5
  function TransactionDemo() {