@explorins/pers-sdk-react-native 1.5.4 → 1.5.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorins/pers-sdk-react-native",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "React Native SDK for PERS Platform - Tourism Loyalty System with Manager Pattern Architecture",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -176,10 +176,19 @@ export const useTransactionSigner = () => {
176
176
  try {
177
177
  console.log('[useTransactionSigner] Initializing PERS transaction signer...');
178
178
 
179
- // TODO: accept direct project key in signer sdk
179
+ // Configure the PERS service with the project key before creating SDK
180
+ if (config?.projectKey) {
181
+ console.log('[useTransactionSigner] Configuring PERS service with project key:', config.projectKey);
182
+ // Import and configure the PERS service
183
+ const { PersService } = await import('@explorins/pers-signer/react-native');
184
+ (PersService as any).configure({
185
+ projectKey: config.projectKey
186
+ });
187
+ console.log('[useTransactionSigner] PERS service configured with project key');
188
+ }
189
+
180
190
  const signerSDK = await createPersSignerSDK({
181
191
  tenantId: config?.tenantId,
182
- // projectKey: config?.projectKey,
183
192
  ethersProviderUrl: config?.ethersProviderUrl || DEFAULT_ETHERS_PROVIDER
184
193
  });
185
194