fix: disable faucet endpoints on mainnet (#1425)

This commit is contained in:
Rafael Cárdenas
2022-11-08 14:24:18 -06:00
committed by GitHub
parent 4a2a342b56
commit b79b9b43d5

View File

@@ -223,7 +223,7 @@ export async function startApiServer(opts: {
router.use('/status', createStatusRouter(datastore));
router.use('/fee_rate', createFeeRateRouter(datastore));
router.use('/tokens', createTokenRouter(datastore));
if (writeDatastore) {
if (chainId !== ChainID.Mainnet && writeDatastore) {
router.use('/faucets', createFaucetRouter(writeDatastore));
}
return router;