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

This commit is contained in:
2025-06-25 16:55:40 +03:00
parent 715c108bb6
commit a316089659
63 changed files with 525 additions and 522 deletions

View File

@@ -28,4 +28,9 @@ async function deleteRpcProvider(networkId) {
await db.getQuery()('DELETE FROM rpc_providers WHERE network_id = $1', [networkId]);
}
module.exports = { getAllRpcProviders, saveAllRpcProviders, upsertRpcProvider, deleteRpcProvider };
async function getRpcUrlByNetworkId(networkId) {
const { rows } = await db.getQuery()('SELECT rpc_url FROM rpc_providers WHERE network_id = $1', [networkId]);
return rows[0]?.rpc_url || null;
}
module.exports = { getAllRpcProviders, saveAllRpcProviders, upsertRpcProvider, deleteRpcProvider, getRpcUrlByNetworkId };