Enhance logging in MerchantStore and NostrmarketAPI for better debugging

- Update the MerchantStore component to include detailed logging during merchant profile creation, capturing wallet ID and admin key details.
- Improve NostrmarketAPI request logging to include method type, headers with masked API key, and a preview of the request body.

These changes aim to facilitate easier debugging and provide more context during API interactions and merchant profile creation.
This commit is contained in:
padreug 2025-09-08 14:09:20 +02:00
parent 4ecec1aa78
commit b8ba41d088
2 changed files with 16 additions and 3 deletions

View file

@ -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 = {