ваше сообщение коммита

This commit is contained in:
2025-09-02 17:18:15 +03:00
parent a6360ccd2e
commit 53bb269b85
26 changed files with 580 additions and 243 deletions

View File

@@ -15,15 +15,12 @@ const logger = require('../utils/logger');
// Получение связанного кошелька
async function getLinkedWallet(userId) {
logger.info(`[getLinkedWallet] Called with userId: ${userId} (Type: ${typeof userId})`);
try {
const result = await encryptedDb.getData('user_identities', {
user_id: userId,
provider: 'wallet'
}, 1);
logger.info(`[getLinkedWallet] DB query result for userId ${userId}:`, result);
const address = result[0]?.provider_id;
logger.info(`[getLinkedWallet] Returning address: ${address} for userId ${userId}`);
return address;
} catch (error) {
logger.error(`[getLinkedWallet] Error fetching linked wallet for userId ${userId}:`, error);