diff --git a/src/modules/market/components/MerchantStore.vue b/src/modules/market/components/MerchantStore.vue index ad6e366..0dcac61 100644 --- a/src/modules/market/components/MerchantStore.vue +++ b/src/modules/market/components/MerchantStore.vue @@ -663,7 +663,11 @@ const createMerchantProfile = async () => { merchantCreateError.value = null try { - console.log('Creating merchant profile...') + console.log('Creating merchant profile...', { + walletId: wallet.id, + adminKeyLength: wallet.adminkey.length, + adminKeyPreview: wallet.adminkey.substring(0, 8) + '...' + }) // Create merchant with empty config, exactly like the nostrmarket extension const merchantData = { diff --git a/src/modules/market/services/nostrmarketAPI.ts b/src/modules/market/services/nostrmarketAPI.ts index 2f584ab..11bfcae 100644 --- a/src/modules/market/services/nostrmarketAPI.ts +++ b/src/modules/market/services/nostrmarketAPI.ts @@ -97,13 +97,22 @@ export class NostrmarketAPI extends BaseService { ): Promise { const url = `${this.baseUrl}/nostrmarket${endpoint}` - this.debug('NostrmarketAPI request:', { endpoint, fullUrl: url }) - const headers: HeadersInit = { 'Content-Type': 'application/json', 'X-API-KEY': walletKey, ...options.headers, } + + this.debug('NostrmarketAPI request:', { + endpoint, + fullUrl: url, + method: options.method || 'GET', + headers: { + 'Content-Type': headers['Content-Type'], + 'X-API-KEY': walletKey.substring(0, 8) + '...' + walletKey.substring(walletKey.length - 4) + }, + bodyPreview: options.body ? JSON.stringify(JSON.parse(options.body as string), null, 2) : undefined + }) const response = await fetch(url, { ...options,