@explorins/pers-sdk-react-native 1.5.12 → 1.5.13
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTransactionSigner.d.ts","sourceRoot":"","sources":["../../src/hooks/useTransactionSigner.ts"],"names":[],"mappings":"AA6EA,UAAU,wBAAwB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,oBAAoB;
|
|
1
|
+
{"version":3,"file":"useTransactionSigner.d.ts","sourceRoot":"","sources":["../../src/hooks/useTransactionSigner.ts"],"names":[],"mappings":"AA6EA,UAAU,wBAAwB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,oBAAoB;IAwR7B;;OAEG;2BAvE2C,MAAM,KAAG,QAAQ,wBAAwB,CAAC;IA0ExF;;OAEG;gCArMgD;QACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B;IAoMC;;OAEG;;IAGH;;OAEG;;CAGN,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE5E;;GAEG;AACH,YAAY,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -201,6 +201,26 @@ export const useTransactionSigner = () => {
|
|
|
201
201
|
}
|
|
202
202
|
await PersService.initializeTenant(config.tenantId, authToken);
|
|
203
203
|
console.log('[useTransactionSigner] Tenant initialized successfully');
|
|
204
|
+
// Get tenant data to extract project key manually
|
|
205
|
+
try {
|
|
206
|
+
const tenantData = await PersService.getTenantById(config.tenantId, authToken);
|
|
207
|
+
console.log('[useTransactionSigner] Tenant data retrieved:', tenantData);
|
|
208
|
+
// Extract and set project key manually if initializeTenant didn't set it
|
|
209
|
+
const projectKey = tenantData.projectApiKey || tenantData.projectKey || tenantData.apiKey;
|
|
210
|
+
if (projectKey) {
|
|
211
|
+
console.log('[useTransactionSigner] Setting project key manually:', projectKey);
|
|
212
|
+
PersService.configure({
|
|
213
|
+
token: authToken,
|
|
214
|
+
projectKey: projectKey
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
console.warn('[useTransactionSigner] No project key found in tenant data:', tenantData);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
catch (tenantError) {
|
|
222
|
+
console.error('[useTransactionSigner] Failed to retrieve tenant data for project key:', tenantError);
|
|
223
|
+
}
|
|
204
224
|
// Verify configuration
|
|
205
225
|
const persConfig = PersService.getConfig();
|
|
206
226
|
console.log('[useTransactionSigner] PERS service config after tenant initialization:', persConfig);
|
package/dist/index.js
CHANGED
|
@@ -30443,6 +30443,26 @@ const useTransactionSigner = () => {
|
|
|
30443
30443
|
}
|
|
30444
30444
|
await PersService.initializeTenant(config.tenantId, authToken);
|
|
30445
30445
|
console.log('[useTransactionSigner] Tenant initialized successfully');
|
|
30446
|
+
// Get tenant data to extract project key manually
|
|
30447
|
+
try {
|
|
30448
|
+
const tenantData = await PersService.getTenantById(config.tenantId, authToken);
|
|
30449
|
+
console.log('[useTransactionSigner] Tenant data retrieved:', tenantData);
|
|
30450
|
+
// Extract and set project key manually if initializeTenant didn't set it
|
|
30451
|
+
const projectKey = tenantData.projectApiKey || tenantData.projectKey || tenantData.apiKey;
|
|
30452
|
+
if (projectKey) {
|
|
30453
|
+
console.log('[useTransactionSigner] Setting project key manually:', projectKey);
|
|
30454
|
+
PersService.configure({
|
|
30455
|
+
token: authToken,
|
|
30456
|
+
projectKey: projectKey
|
|
30457
|
+
});
|
|
30458
|
+
}
|
|
30459
|
+
else {
|
|
30460
|
+
console.warn('[useTransactionSigner] No project key found in tenant data:', tenantData);
|
|
30461
|
+
}
|
|
30462
|
+
}
|
|
30463
|
+
catch (tenantError) {
|
|
30464
|
+
console.error('[useTransactionSigner] Failed to retrieve tenant data for project key:', tenantError);
|
|
30465
|
+
}
|
|
30446
30466
|
// Verify configuration
|
|
30447
30467
|
const persConfig = PersService.getConfig();
|
|
30448
30468
|
console.log('[useTransactionSigner] PERS service config after tenant initialization:', persConfig);
|