@diviswap/sdk 1.7.10 → 1.7.12

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
@@ -72,6 +72,23 @@ async function detectFramework() {
72
72
  return null;
73
73
  }
74
74
  function getPackageRoot() {
75
+ try {
76
+ const bundleDir = __dirname;
77
+ if (fs.existsSync(path.join(bundleDir, "templates"))) {
78
+ return path.dirname(path.dirname(bundleDir));
79
+ }
80
+ let packageRoot = bundleDir;
81
+ for (let i = 0; i < 5; i++) {
82
+ if (fs.existsSync(path.join(packageRoot, "dist", "cli", "templates"))) {
83
+ return packageRoot;
84
+ }
85
+ if (fs.existsSync(path.join(packageRoot, "src", "cli", "templates"))) {
86
+ return packageRoot;
87
+ }
88
+ packageRoot = path.dirname(packageRoot);
89
+ }
90
+ } catch {
91
+ }
75
92
  if (fs.existsSync(path.join(process.cwd(), "src", "cli", "templates"))) {
76
93
  return process.cwd();
77
94
  }
@@ -1914,7 +1931,7 @@ async function uninstall(options = {}) {
1914
1931
  }
1915
1932
 
1916
1933
  // package.json
1917
- var version = "1.7.10";
1934
+ var version = "1.7.12";
1918
1935
 
1919
1936
  // src/cli/index.ts
1920
1937
  var program = new commander.Command();
@@ -106,7 +106,7 @@ export function useTransactions() {
106
106
  ...filters
107
107
  });
108
108
 
109
- const response = await fetch(`/api/diviswap?${queryParams}`);
109
+ const response = await fetch(`/api/diviswap?\${queryParams}`);
110
110
  if (!response.ok) throw new Error('Failed to fetch transactions');
111
111
 
112
112
  const data = await response.json();
@@ -180,7 +180,7 @@ export function usePayees() {
180
180
  setError(null);
181
181
 
182
182
  try {
183
- const response = await fetch(`/api/diviswap?resource=payees&customerId=${customerId}&customerEmail=${customerEmail}`);
183
+ const response = await fetch(`/api/diviswap?resource=payees&customerId=\${customerId}&customerEmail=\${customerEmail}`);
184
184
  if (!response.ok) throw new Error('Failed to fetch payees');
185
185
 
186
186
  const data = await response.json();
@@ -237,7 +237,7 @@ export function usePayees() {
237
237
  setError(null);
238
238
 
239
239
  try {
240
- const response = await fetch(`/api/diviswap?resource=payee&id=${id}&customerId=${customerId}&customerEmail=${customerEmail}`, {
240
+ const response = await fetch(`/api/diviswap?resource=payee&id=\${id}&customerId=\${customerId}&customerEmail=\${customerEmail}`, {
241
241
  method: 'DELETE'
242
242
  });
243
243
 
@@ -286,7 +286,7 @@ export function useKYC() {
286
286
  setError(null);
287
287
 
288
288
  try {
289
- const response = await fetch(`/api/diviswap?resource=kycStatus&customerId=${customerId}&customerEmail=${customerEmail}`);
289
+ const response = await fetch(`/api/diviswap?resource=kycStatus&customerId=\${customerId}&customerEmail=\${customerEmail}`);
290
290
  if (!response.ok) throw new Error('Failed to fetch KYC status');
291
291
 
292
292
  const data = await response.json();
@@ -157,7 +157,7 @@ const postHandlers: Record<string, ActionHandler> = {
157
157
  if (params.routingNumber && params.routingNumber.includes('/')) {
158
158
  const expiryParts = params.routingNumber.split('/');
159
159
  expirationMonth = expiryParts[0];
160
- expirationYear = expiryParts[1] ? `20${expiryParts[1]}` : '2025';
160
+ expirationYear = expiryParts[1] ? `20\${expiryParts[1]}` : '2025';
161
161
  }
162
162
 
163
163
  const debitCardPayload = {
@@ -230,7 +230,7 @@ const postHandlers: Record<string, ActionHandler> = {
230
230
  }
231
231
 
232
232
  // Clean up the payload - remove undefined/null values and empty strings for optional fields
233
- const street = address.addressLine1 + (address.addressLine2 && address.addressLine2.trim() ? ` ${address.addressLine2.trim()}` : '');
233
+ const street = address.addressLine1 + (address.addressLine2 && address.addressLine2.trim() ? ` \${address.addressLine2.trim()}` : '');
234
234
 
235
235
  const kycPayload = {
236
236
  firstName: personalInfo.firstName,
@@ -8,7 +8,7 @@ export class DiviswapClient {
8
8
  endpoint: string,
9
9
  options: RequestInit = {}
10
10
  ): Promise<T> {
11
- const response = await fetch(`${this.baseUrl}${endpoint}`, {
11
+ const response = await fetch(`\${this.baseUrl}\${endpoint}`, {
12
12
  ...options,
13
13
  headers: {
14
14
  'Content-Type': 'application/json',
@@ -41,7 +41,7 @@ export class DiviswapClient {
41
41
 
42
42
  async getCustomerStatus(customerId: string, customerEmail: string) {
43
43
  try {
44
- return await this.request(`?resource=customerStatus&customerId=${encodeURIComponent(customerId)}&customerEmail=${encodeURIComponent(customerEmail)}`);
44
+ return await this.request(`?resource=customerStatus&customerId=\${encodeURIComponent(customerId)}&customerEmail=\${encodeURIComponent(customerEmail)}`);
45
45
  } catch {
46
46
  return null;
47
47
  }
@@ -72,16 +72,16 @@ export class DiviswapClient {
72
72
  ...(params.type && { type: params.type }),
73
73
  }),
74
74
  });
75
- return this.request(`?${searchParams}`);
75
+ return this.request(`?\${searchParams}`);
76
76
  }
77
77
 
78
78
  async getTransaction(id: string) {
79
- return this.request(`?resource=transaction&id=${id}`);
79
+ return this.request(`?resource=transaction&id=\${id}`);
80
80
  }
81
81
 
82
82
  // Payee methods
83
83
  async getPayees(customerId: string, customerEmail: string) {
84
- return this.request(`?resource=payees&customerId=${encodeURIComponent(customerId)}&customerEmail=${encodeURIComponent(customerEmail)}`);
84
+ return this.request(`?resource=payees&customerId=\${encodeURIComponent(customerId)}&customerEmail=\${encodeURIComponent(customerEmail)}`);
85
85
  }
86
86
 
87
87
  async createPayee(data: any) {
@@ -92,7 +92,7 @@ export class DiviswapClient {
92
92
  }
93
93
 
94
94
  async deletePayee(id: string, customerId: string, customerEmail: string) {
95
- return this.request(`?resource=payee&id=${id}&customerId=${encodeURIComponent(customerId)}&customerEmail=${encodeURIComponent(customerEmail)}`, {
95
+ return this.request(`?resource=payee&id=\${id}&customerId=\${encodeURIComponent(customerId)}&customerEmail=\${encodeURIComponent(customerEmail)}`, {
96
96
  method: 'DELETE',
97
97
  });
98
98
  }
@@ -15,14 +15,14 @@ export function use{{prefix}}Dashboard() {
15
15
  customerEmail,
16
16
  ...params
17
17
  });
18
- const response = await fetch(`/api/diviswap?${queryParams}`);
18
+ const response = await fetch(`/api/diviswap?\${queryParams}`);
19
19
  if (!response.ok) throw new Error('Failed to fetch transactions');
20
20
  return response.json();
21
21
  };
22
22
 
23
23
  const getPayees = async () => {
24
24
  if (!isAuthenticated || !customerId) return [];
25
- const response = await fetch(`/api/diviswap?resource=payees&customerId=${customerId}&customerEmail=${customerEmail}`);
25
+ const response = await fetch(`/api/diviswap?resource=payees&customerId=\${customerId}&customerEmail=\${customerEmail}`);
26
26
  if (!response.ok) throw new Error('Failed to fetch payees');
27
27
  return response.json();
28
28
  };
@@ -36,7 +36,7 @@ export function use{{prefix}}Dashboard() {
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
  });
39
- const response = await fetch(`/api/diviswap?${queryParams}`);
39
+ const response = await fetch(`/api/diviswap?\${queryParams}`);
40
40
  if (!response.ok) throw new Error('Failed to fetch addresses');
41
41
  return response.json();
42
42
  };
@@ -20,7 +20,7 @@ export default function DiviswapDemo() {
20
20
  };
21
21
 
22
22
  const handleKYCError = (error: Error) => {
23
- alert(`KYC Error: ${error.message}`);
23
+ alert(`KYC Error: \${error.message}`);
24
24
  };
25
25
 
26
26
  return (
@@ -60,7 +60,7 @@ export default function DiviswapDemo() {
60
60
  <div className="flex space-x-1 mb-8">
61
61
  <button
62
62
  onClick={() => setCurrentDemo('kyc-inline')}
63
- className={`flex-1 py-3 px-6 text-sm font-medium rounded-lg transition-colors ${
63
+ className={`flex-1 py-3 px-6 text-sm font-medium rounded-lg transition-colors \${
64
64
  currentDemo === 'kyc-inline'
65
65
  ? 'bg-indigo-100 text-indigo-700 border-2 border-indigo-200'
66
66
  : 'text-gray-500 hover:text-gray-700 border-2 border-transparent'
@@ -70,7 +70,7 @@ export default function DiviswapDemo() {
70
70
  </button>
71
71
  <button
72
72
  onClick={() => setCurrentDemo('kyc-modal')}
73
- className={`flex-1 py-3 px-6 text-sm font-medium rounded-lg transition-colors ${
73
+ className={`flex-1 py-3 px-6 text-sm font-medium rounded-lg transition-colors \${
74
74
  currentDemo === 'kyc-modal'
75
75
  ? 'bg-indigo-100 text-indigo-700 border-2 border-indigo-200'
76
76
  : 'text-gray-500 hover:text-gray-700 border-2 border-transparent'
@@ -80,7 +80,7 @@ export default function DiviswapDemo() {
80
80
  </button>
81
81
  <button
82
82
  onClick={() => setCurrentDemo('features')}
83
- className={`flex-1 py-3 px-6 text-sm font-medium rounded-lg transition-colors ${
83
+ className={`flex-1 py-3 px-6 text-sm font-medium rounded-lg transition-colors \${
84
84
  currentDemo === 'features'
85
85
  ? 'bg-indigo-100 text-indigo-700 border-2 border-indigo-200'
86
86
  : 'text-gray-500 hover:text-gray-700 border-2 border-transparent'
@@ -29,7 +29,7 @@ export function use{{prefix}}KYC() {
29
29
 
30
30
  try {
31
31
  // Format date of birth
32
- const dateOfBirth = `${formData.dobYear}-${formData.dobMonth.padStart(2, '0')}-${formData.dobDay.padStart(2, '0')}`;
32
+ const dateOfBirth = `\${formData.dobYear}-\${formData.dobMonth.padStart(2, '0')}-\${formData.dobDay.padStart(2, '0')}`;
33
33
 
34
34
  // Prepare KYC data
35
35
  const kycData = {
@@ -82,7 +82,7 @@ export function LiberexKYC({
82
82
  setIsSubmitting(true);
83
83
  try {
84
84
  // Format date of birth
85
- const dateOfBirth = `${formData.dobYear}-${formData.dobMonth.padStart(2, '0')}-${formData.dobDay.padStart(2, '0')}`;
85
+ const dateOfBirth = `\${formData.dobYear}-\${formData.dobMonth.padStart(2, '0')}-\${formData.dobDay.padStart(2, '0')}`;
86
86
 
87
87
  // Prepare KYC data
88
88
  const kycData = {
@@ -170,7 +170,7 @@ export function LiberexKYC({
170
170
  };
171
171
 
172
172
  return (
173
- <div className={`diviswap-kyc-container ${className}`} style={containerStyle}>
173
+ <div className={`diviswap-kyc-container \${className}`} style={containerStyle}>
174
174
  {/* Progress Bar */}
175
175
  {currentStep !== 'intro' && currentStep !== 'success' && (
176
176
  <div className="progress-container">
@@ -178,7 +178,7 @@ export function LiberexKYC({
178
178
  <div
179
179
  className="progress-fill"
180
180
  style={{
181
- width: `${progressPercentage}%`,
181
+ width: `\${progressPercentage}%`,
182
182
  backgroundColor: themeConfig.primaryColor
183
183
  }}
184
184
  />
@@ -620,7 +620,7 @@ function ReviewStep({ formData, onSubmit, onPrev, isSubmitting, theme }: any) {
620
620
  <span>Address:</span>
621
621
  <span>
622
622
  {formData.addressLine1}
623
- {formData.addressLine2 && `, ${formData.addressLine2}`}
623
+ {formData.addressLine2 && `, \${formData.addressLine2}`}
624
624
  </span>
625
625
  </div>
626
626
  <div className="review-item">
@@ -73,7 +73,7 @@ class DiviswapClient {
73
73
  endpoint: string,
74
74
  options: RequestInit = {}
75
75
  ): Promise<T> {
76
- const response = await fetch(`${this.baseUrl}${endpoint}`, {
76
+ const response = await fetch(`\${this.baseUrl}\${endpoint}`, {
77
77
  ...options,
78
78
  headers: {
79
79
  'Content-Type': 'application/json',
@@ -106,7 +106,7 @@ class DiviswapClient {
106
106
 
107
107
  async getCustomerStatus(customerId: string, customerEmail: string) {
108
108
  try {
109
- return await this.request(`?resource=customerStatus&customerId=${encodeURIComponent(customerId)}&customerEmail=${encodeURIComponent(customerEmail)}`);
109
+ return await this.request(`?resource=customerStatus&customerId=\${encodeURIComponent(customerId)}&customerEmail=\${encodeURIComponent(customerEmail)}`);
110
110
  } catch {
111
111
  return null;
112
112
  }
@@ -132,16 +132,16 @@ class DiviswapClient {
132
132
  ...(params.type && { type: params.type }),
133
133
  }),
134
134
  });
135
- return this.request(`?${searchParams}`);
135
+ return this.request(`?\${searchParams}`);
136
136
  }
137
137
 
138
138
  async getTransaction(id: string) {
139
- return this.request(`?resource=transaction&id=${id}`);
139
+ return this.request(`?resource=transaction&id=\${id}`);
140
140
  }
141
141
 
142
142
  // Payee methods
143
143
  async getPayees(customerId: string, customerEmail: string) {
144
- return this.request(`?resource=payees&customerId=${encodeURIComponent(customerId)}&customerEmail=${encodeURIComponent(customerEmail)}`);
144
+ return this.request(`?resource=payees&customerId=\${encodeURIComponent(customerId)}&customerEmail=\${encodeURIComponent(customerEmail)}`);
145
145
  }
146
146
 
147
147
  async createPayee(data: any) {
@@ -152,7 +152,7 @@ class DiviswapClient {
152
152
  }
153
153
 
154
154
  async deletePayee(id: string, customerId: string, customerEmail: string) {
155
- return this.request(`?resource=payee&id=${id}&customerId=${encodeURIComponent(customerId)}&customerEmail=${encodeURIComponent(customerEmail)}`, {
155
+ return this.request(`?resource=payee&id=\${id}&customerId=\${encodeURIComponent(customerId)}&customerEmail=\${encodeURIComponent(customerEmail)}`, {
156
156
  method: 'DELETE',
157
157
  });
158
158
  }
@@ -18,10 +18,10 @@ class ApiClient {
18
18
  private async request<T = any>(endpoint: string, options: ApiOptions = {}): Promise<T> {
19
19
  const { params, ...fetchOptions } = options;
20
20
 
21
- let url = `${this.baseUrl}${endpoint}`;
21
+ let url = `\${this.baseUrl}\${endpoint}`;
22
22
  if (params) {
23
23
  const searchParams = new URLSearchParams(params);
24
- url += `?${searchParams.toString()}`;
24
+ url += `?\${searchParams.toString()}`;
25
25
  }
26
26
 
27
27
  const response = await fetch(url, {
@@ -34,7 +34,7 @@ class ApiClient {
34
34
 
35
35
  if (!response.ok) {
36
36
  const error = await response.json().catch(() => ({ message: 'Request failed' }));
37
- throw new Error(error.message || `HTTP ${response.status}`);
37
+ throw new Error(error.message || `HTTP \${response.status}`);
38
38
  }
39
39
 
40
40
  return response.json();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diviswap/sdk",
3
- "version": "1.7.10",
3
+ "version": "1.7.12",
4
4
  "description": "Official Diviswap SDK - Crypto rails made simple",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -106,7 +106,7 @@ export function useTransactions() {
106
106
  ...filters
107
107
  });
108
108
 
109
- const response = await fetch(`/api/diviswap?${queryParams}`);
109
+ const response = await fetch(`/api/diviswap?\${queryParams}`);
110
110
  if (!response.ok) throw new Error('Failed to fetch transactions');
111
111
 
112
112
  const data = await response.json();
@@ -180,7 +180,7 @@ export function usePayees() {
180
180
  setError(null);
181
181
 
182
182
  try {
183
- const response = await fetch(`/api/diviswap?resource=payees&customerId=${customerId}&customerEmail=${customerEmail}`);
183
+ const response = await fetch(`/api/diviswap?resource=payees&customerId=\${customerId}&customerEmail=\${customerEmail}`);
184
184
  if (!response.ok) throw new Error('Failed to fetch payees');
185
185
 
186
186
  const data = await response.json();
@@ -237,7 +237,7 @@ export function usePayees() {
237
237
  setError(null);
238
238
 
239
239
  try {
240
- const response = await fetch(`/api/diviswap?resource=payee&id=${id}&customerId=${customerId}&customerEmail=${customerEmail}`, {
240
+ const response = await fetch(`/api/diviswap?resource=payee&id=\${id}&customerId=\${customerId}&customerEmail=\${customerEmail}`, {
241
241
  method: 'DELETE'
242
242
  });
243
243
 
@@ -286,7 +286,7 @@ export function useKYC() {
286
286
  setError(null);
287
287
 
288
288
  try {
289
- const response = await fetch(`/api/diviswap?resource=kycStatus&customerId=${customerId}&customerEmail=${customerEmail}`);
289
+ const response = await fetch(`/api/diviswap?resource=kycStatus&customerId=\${customerId}&customerEmail=\${customerEmail}`);
290
290
  if (!response.ok) throw new Error('Failed to fetch KYC status');
291
291
 
292
292
  const data = await response.json();
@@ -157,7 +157,7 @@ const postHandlers: Record<string, ActionHandler> = {
157
157
  if (params.routingNumber && params.routingNumber.includes('/')) {
158
158
  const expiryParts = params.routingNumber.split('/');
159
159
  expirationMonth = expiryParts[0];
160
- expirationYear = expiryParts[1] ? `20${expiryParts[1]}` : '2025';
160
+ expirationYear = expiryParts[1] ? `20\${expiryParts[1]}` : '2025';
161
161
  }
162
162
 
163
163
  const debitCardPayload = {
@@ -230,7 +230,7 @@ const postHandlers: Record<string, ActionHandler> = {
230
230
  }
231
231
 
232
232
  // Clean up the payload - remove undefined/null values and empty strings for optional fields
233
- const street = address.addressLine1 + (address.addressLine2 && address.addressLine2.trim() ? ` ${address.addressLine2.trim()}` : '');
233
+ const street = address.addressLine1 + (address.addressLine2 && address.addressLine2.trim() ? ` \${address.addressLine2.trim()}` : '');
234
234
 
235
235
  const kycPayload = {
236
236
  firstName: personalInfo.firstName,
@@ -8,7 +8,7 @@ export class DiviswapClient {
8
8
  endpoint: string,
9
9
  options: RequestInit = {}
10
10
  ): Promise<T> {
11
- const response = await fetch(`${this.baseUrl}${endpoint}`, {
11
+ const response = await fetch(`\${this.baseUrl}\${endpoint}`, {
12
12
  ...options,
13
13
  headers: {
14
14
  'Content-Type': 'application/json',
@@ -41,7 +41,7 @@ export class DiviswapClient {
41
41
 
42
42
  async getCustomerStatus(customerId: string, customerEmail: string) {
43
43
  try {
44
- return await this.request(`?resource=customerStatus&customerId=${encodeURIComponent(customerId)}&customerEmail=${encodeURIComponent(customerEmail)}`);
44
+ return await this.request(`?resource=customerStatus&customerId=\${encodeURIComponent(customerId)}&customerEmail=\${encodeURIComponent(customerEmail)}`);
45
45
  } catch {
46
46
  return null;
47
47
  }
@@ -72,16 +72,16 @@ export class DiviswapClient {
72
72
  ...(params.type && { type: params.type }),
73
73
  }),
74
74
  });
75
- return this.request(`?${searchParams}`);
75
+ return this.request(`?\${searchParams}`);
76
76
  }
77
77
 
78
78
  async getTransaction(id: string) {
79
- return this.request(`?resource=transaction&id=${id}`);
79
+ return this.request(`?resource=transaction&id=\${id}`);
80
80
  }
81
81
 
82
82
  // Payee methods
83
83
  async getPayees(customerId: string, customerEmail: string) {
84
- return this.request(`?resource=payees&customerId=${encodeURIComponent(customerId)}&customerEmail=${encodeURIComponent(customerEmail)}`);
84
+ return this.request(`?resource=payees&customerId=\${encodeURIComponent(customerId)}&customerEmail=\${encodeURIComponent(customerEmail)}`);
85
85
  }
86
86
 
87
87
  async createPayee(data: any) {
@@ -92,7 +92,7 @@ export class DiviswapClient {
92
92
  }
93
93
 
94
94
  async deletePayee(id: string, customerId: string, customerEmail: string) {
95
- return this.request(`?resource=payee&id=${id}&customerId=${encodeURIComponent(customerId)}&customerEmail=${encodeURIComponent(customerEmail)}`, {
95
+ return this.request(`?resource=payee&id=\${id}&customerId=\${encodeURIComponent(customerId)}&customerEmail=\${encodeURIComponent(customerEmail)}`, {
96
96
  method: 'DELETE',
97
97
  });
98
98
  }
@@ -15,14 +15,14 @@ export function use{{prefix}}Dashboard() {
15
15
  customerEmail,
16
16
  ...params
17
17
  });
18
- const response = await fetch(`/api/diviswap?${queryParams}`);
18
+ const response = await fetch(`/api/diviswap?\${queryParams}`);
19
19
  if (!response.ok) throw new Error('Failed to fetch transactions');
20
20
  return response.json();
21
21
  };
22
22
 
23
23
  const getPayees = async () => {
24
24
  if (!isAuthenticated || !customerId) return [];
25
- const response = await fetch(`/api/diviswap?resource=payees&customerId=${customerId}&customerEmail=${customerEmail}`);
25
+ const response = await fetch(`/api/diviswap?resource=payees&customerId=\${customerId}&customerEmail=\${customerEmail}`);
26
26
  if (!response.ok) throw new Error('Failed to fetch payees');
27
27
  return response.json();
28
28
  };
@@ -36,7 +36,7 @@ export function use{{prefix}}Dashboard() {
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
  });
39
- const response = await fetch(`/api/diviswap?${queryParams}`);
39
+ const response = await fetch(`/api/diviswap?\${queryParams}`);
40
40
  if (!response.ok) throw new Error('Failed to fetch addresses');
41
41
  return response.json();
42
42
  };
@@ -20,7 +20,7 @@ export default function DiviswapDemo() {
20
20
  };
21
21
 
22
22
  const handleKYCError = (error: Error) => {
23
- alert(`KYC Error: ${error.message}`);
23
+ alert(`KYC Error: \${error.message}`);
24
24
  };
25
25
 
26
26
  return (
@@ -60,7 +60,7 @@ export default function DiviswapDemo() {
60
60
  <div className="flex space-x-1 mb-8">
61
61
  <button
62
62
  onClick={() => setCurrentDemo('kyc-inline')}
63
- className={`flex-1 py-3 px-6 text-sm font-medium rounded-lg transition-colors ${
63
+ className={`flex-1 py-3 px-6 text-sm font-medium rounded-lg transition-colors \${
64
64
  currentDemo === 'kyc-inline'
65
65
  ? 'bg-indigo-100 text-indigo-700 border-2 border-indigo-200'
66
66
  : 'text-gray-500 hover:text-gray-700 border-2 border-transparent'
@@ -70,7 +70,7 @@ export default function DiviswapDemo() {
70
70
  </button>
71
71
  <button
72
72
  onClick={() => setCurrentDemo('kyc-modal')}
73
- className={`flex-1 py-3 px-6 text-sm font-medium rounded-lg transition-colors ${
73
+ className={`flex-1 py-3 px-6 text-sm font-medium rounded-lg transition-colors \${
74
74
  currentDemo === 'kyc-modal'
75
75
  ? 'bg-indigo-100 text-indigo-700 border-2 border-indigo-200'
76
76
  : 'text-gray-500 hover:text-gray-700 border-2 border-transparent'
@@ -80,7 +80,7 @@ export default function DiviswapDemo() {
80
80
  </button>
81
81
  <button
82
82
  onClick={() => setCurrentDemo('features')}
83
- className={`flex-1 py-3 px-6 text-sm font-medium rounded-lg transition-colors ${
83
+ className={`flex-1 py-3 px-6 text-sm font-medium rounded-lg transition-colors \${
84
84
  currentDemo === 'features'
85
85
  ? 'bg-indigo-100 text-indigo-700 border-2 border-indigo-200'
86
86
  : 'text-gray-500 hover:text-gray-700 border-2 border-transparent'
@@ -29,7 +29,7 @@ export function use{{prefix}}KYC() {
29
29
 
30
30
  try {
31
31
  // Format date of birth
32
- const dateOfBirth = `${formData.dobYear}-${formData.dobMonth.padStart(2, '0')}-${formData.dobDay.padStart(2, '0')}`;
32
+ const dateOfBirth = `\${formData.dobYear}-\${formData.dobMonth.padStart(2, '0')}-\${formData.dobDay.padStart(2, '0')}`;
33
33
 
34
34
  // Prepare KYC data
35
35
  const kycData = {
@@ -82,7 +82,7 @@ export function LiberexKYC({
82
82
  setIsSubmitting(true);
83
83
  try {
84
84
  // Format date of birth
85
- const dateOfBirth = `${formData.dobYear}-${formData.dobMonth.padStart(2, '0')}-${formData.dobDay.padStart(2, '0')}`;
85
+ const dateOfBirth = `\${formData.dobYear}-\${formData.dobMonth.padStart(2, '0')}-\${formData.dobDay.padStart(2, '0')}`;
86
86
 
87
87
  // Prepare KYC data
88
88
  const kycData = {
@@ -170,7 +170,7 @@ export function LiberexKYC({
170
170
  };
171
171
 
172
172
  return (
173
- <div className={`diviswap-kyc-container ${className}`} style={containerStyle}>
173
+ <div className={`diviswap-kyc-container \${className}`} style={containerStyle}>
174
174
  {/* Progress Bar */}
175
175
  {currentStep !== 'intro' && currentStep !== 'success' && (
176
176
  <div className="progress-container">
@@ -178,7 +178,7 @@ export function LiberexKYC({
178
178
  <div
179
179
  className="progress-fill"
180
180
  style={{
181
- width: `${progressPercentage}%`,
181
+ width: `\${progressPercentage}%`,
182
182
  backgroundColor: themeConfig.primaryColor
183
183
  }}
184
184
  />
@@ -620,7 +620,7 @@ function ReviewStep({ formData, onSubmit, onPrev, isSubmitting, theme }: any) {
620
620
  <span>Address:</span>
621
621
  <span>
622
622
  {formData.addressLine1}
623
- {formData.addressLine2 && `, ${formData.addressLine2}`}
623
+ {formData.addressLine2 && `, \${formData.addressLine2}`}
624
624
  </span>
625
625
  </div>
626
626
  <div className="review-item">
@@ -73,7 +73,7 @@ class DiviswapClient {
73
73
  endpoint: string,
74
74
  options: RequestInit = {}
75
75
  ): Promise<T> {
76
- const response = await fetch(`${this.baseUrl}${endpoint}`, {
76
+ const response = await fetch(`\${this.baseUrl}\${endpoint}`, {
77
77
  ...options,
78
78
  headers: {
79
79
  'Content-Type': 'application/json',
@@ -106,7 +106,7 @@ class DiviswapClient {
106
106
 
107
107
  async getCustomerStatus(customerId: string, customerEmail: string) {
108
108
  try {
109
- return await this.request(`?resource=customerStatus&customerId=${encodeURIComponent(customerId)}&customerEmail=${encodeURIComponent(customerEmail)}`);
109
+ return await this.request(`?resource=customerStatus&customerId=\${encodeURIComponent(customerId)}&customerEmail=\${encodeURIComponent(customerEmail)}`);
110
110
  } catch {
111
111
  return null;
112
112
  }
@@ -132,16 +132,16 @@ class DiviswapClient {
132
132
  ...(params.type && { type: params.type }),
133
133
  }),
134
134
  });
135
- return this.request(`?${searchParams}`);
135
+ return this.request(`?\${searchParams}`);
136
136
  }
137
137
 
138
138
  async getTransaction(id: string) {
139
- return this.request(`?resource=transaction&id=${id}`);
139
+ return this.request(`?resource=transaction&id=\${id}`);
140
140
  }
141
141
 
142
142
  // Payee methods
143
143
  async getPayees(customerId: string, customerEmail: string) {
144
- return this.request(`?resource=payees&customerId=${encodeURIComponent(customerId)}&customerEmail=${encodeURIComponent(customerEmail)}`);
144
+ return this.request(`?resource=payees&customerId=\${encodeURIComponent(customerId)}&customerEmail=\${encodeURIComponent(customerEmail)}`);
145
145
  }
146
146
 
147
147
  async createPayee(data: any) {
@@ -152,7 +152,7 @@ class DiviswapClient {
152
152
  }
153
153
 
154
154
  async deletePayee(id: string, customerId: string, customerEmail: string) {
155
- return this.request(`?resource=payee&id=${id}&customerId=${encodeURIComponent(customerId)}&customerEmail=${encodeURIComponent(customerEmail)}`, {
155
+ return this.request(`?resource=payee&id=\${id}&customerId=\${encodeURIComponent(customerId)}&customerEmail=\${encodeURIComponent(customerEmail)}`, {
156
156
  method: 'DELETE',
157
157
  });
158
158
  }
@@ -18,10 +18,10 @@ class ApiClient {
18
18
  private async request<T = any>(endpoint: string, options: ApiOptions = {}): Promise<T> {
19
19
  const { params, ...fetchOptions } = options;
20
20
 
21
- let url = `${this.baseUrl}${endpoint}`;
21
+ let url = `\${this.baseUrl}\${endpoint}`;
22
22
  if (params) {
23
23
  const searchParams = new URLSearchParams(params);
24
- url += `?${searchParams.toString()}`;
24
+ url += `?\${searchParams.toString()}`;
25
25
  }
26
26
 
27
27
  const response = await fetch(url, {
@@ -34,7 +34,7 @@ class ApiClient {
34
34
 
35
35
  if (!response.ok) {
36
36
  const error = await response.json().catch(() => ({ message: 'Request failed' }));
37
- throw new Error(error.message || `HTTP ${response.status}`);
37
+ throw new Error(error.message || `HTTP \${response.status}`);
38
38
  }
39
39
 
40
40
  return response.json();