@diviswap/sdk 1.7.18 → 1.7.19
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 +5 -5
- package/dist/cli/templates/nextjs-app/dashboard-hooks.ts.hbs +3 -3
- package/dist/cli/templates/nextjs-app/kyc-hooks.ts.hbs +1 -1
- package/package.json +1 -1
- package/src/cli/templates/nextjs-app/dashboard-hooks.ts.hbs +3 -3
- package/src/cli/templates/nextjs-app/kyc-hooks.ts.hbs +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -232,12 +232,12 @@ async function generateNextjsAppFiles(ensureFile, features, projectRoot) {
|
|
|
232
232
|
getTemplate("nextjs-app/auth-context", { features, prefix: "Diviswap" })
|
|
233
233
|
);
|
|
234
234
|
ensureFile(
|
|
235
|
-
`${prefix}hooks/
|
|
236
|
-
getTemplate("nextjs-app/dashboard-hooks", { features })
|
|
235
|
+
`${prefix}hooks/useDiviswapData.ts`,
|
|
236
|
+
getTemplate("nextjs-app/dashboard-hooks", { features, prefix: "Diviswap" })
|
|
237
237
|
);
|
|
238
238
|
ensureFile(
|
|
239
|
-
`${prefix}hooks/
|
|
240
|
-
getTemplate("nextjs-app/kyc-hooks", { features })
|
|
239
|
+
`${prefix}hooks/useDiviswapKYC.ts`,
|
|
240
|
+
getTemplate("nextjs-app/kyc-hooks", { features, prefix: "Diviswap" })
|
|
241
241
|
);
|
|
242
242
|
ensureFile(
|
|
243
243
|
`${prefix}components/diviswap-kyc-wizard.tsx`,
|
|
@@ -1937,7 +1937,7 @@ async function uninstall(options = {}) {
|
|
|
1937
1937
|
}
|
|
1938
1938
|
|
|
1939
1939
|
// package.json
|
|
1940
|
-
var version = "1.7.
|
|
1940
|
+
var version = "1.7.19";
|
|
1941
1941
|
|
|
1942
1942
|
// src/cli/index.ts
|
|
1943
1943
|
var program = new commander.Command();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
|
-
import { use{{prefix}}Auth } from '
|
|
4
|
+
import { use{{prefix}}Auth } from '../context/diviswap-auth-context';
|
|
5
5
|
|
|
6
6
|
export function use{{prefix}}Dashboard() {
|
|
7
7
|
const { customerId, customerEmail, isAuthenticated } = use{{prefix}}Auth();
|
|
@@ -12,7 +12,7 @@ export function use{{prefix}}Dashboard() {
|
|
|
12
12
|
const queryParams = new URLSearchParams({
|
|
13
13
|
resource: 'transactions',
|
|
14
14
|
customerId,
|
|
15
|
-
customerEmail,
|
|
15
|
+
...(customerEmail && { customerEmail }),
|
|
16
16
|
...params
|
|
17
17
|
});
|
|
18
18
|
const response = await fetch(`/api/diviswap?${queryParams}`);
|
|
@@ -32,7 +32,7 @@ export function use{{prefix}}Dashboard() {
|
|
|
32
32
|
const queryParams = new URLSearchParams({
|
|
33
33
|
resource: 'addresses',
|
|
34
34
|
customerId,
|
|
35
|
-
customerEmail,
|
|
35
|
+
...(customerEmail && { customerEmail }),
|
|
36
36
|
...(params?.chain_id && { chain_id: params.chain_id.toString() }),
|
|
37
37
|
...(params?.is_default !== undefined && { is_default: params.is_default.toString() })
|
|
38
38
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
|
-
import { use{{prefix}}Auth } from '
|
|
4
|
+
import { use{{prefix}}Auth } from '../context/diviswap-auth-context';
|
|
5
5
|
|
|
6
6
|
export function use{{prefix}}Dashboard() {
|
|
7
7
|
const { customerId, customerEmail, isAuthenticated } = use{{prefix}}Auth();
|
|
@@ -12,7 +12,7 @@ export function use{{prefix}}Dashboard() {
|
|
|
12
12
|
const queryParams = new URLSearchParams({
|
|
13
13
|
resource: 'transactions',
|
|
14
14
|
customerId,
|
|
15
|
-
customerEmail,
|
|
15
|
+
...(customerEmail && { customerEmail }),
|
|
16
16
|
...params
|
|
17
17
|
});
|
|
18
18
|
const response = await fetch(`/api/diviswap?${queryParams}`);
|
|
@@ -32,7 +32,7 @@ export function use{{prefix}}Dashboard() {
|
|
|
32
32
|
const queryParams = new URLSearchParams({
|
|
33
33
|
resource: 'addresses',
|
|
34
34
|
customerId,
|
|
35
|
-
customerEmail,
|
|
35
|
+
...(customerEmail && { customerEmail }),
|
|
36
36
|
...(params?.chain_id && { chain_id: params.chain_id.toString() }),
|
|
37
37
|
...(params?.is_default !== undefined && { is_default: params.is_default.toString() })
|
|
38
38
|
});
|