udpdate wallet function
This commit is contained in:
@@ -20,18 +20,20 @@ class WalletService {
|
||||
}
|
||||
// Добавляем метод для получения кошельков по типу
|
||||
static async getWalletsByType(walletType) {
|
||||
try {
|
||||
const wallets = await db.allAsync(
|
||||
`SELECT * FROM crypto_wallets WHERE wallet_type = ?`,
|
||||
[walletType]
|
||||
);
|
||||
|
||||
return wallets;
|
||||
} catch (error) {
|
||||
console.error('Error fetching wallets by type:', error);
|
||||
throw new Error('Failed to fetch wallets by type');
|
||||
try {
|
||||
const wallets = await db.allAsync(
|
||||
`SELECT *
|
||||
FROM crypto_wallets
|
||||
WHERE wallet_type = ?`,
|
||||
[walletType]
|
||||
);
|
||||
|
||||
return wallets;
|
||||
} catch (error) {
|
||||
console.error('Error fetching wallets by type:', error);
|
||||
throw new Error('Failed to fetch wallets by type');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default WalletService;
|
||||
Reference in New Issue
Block a user