Skip to content

Commit ced8242

Browse files
committed
fix: update BTC faucet comments to use regtest instead of testnet
1 parent 8e3f288 commit ced8242

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/api/routes/faucets.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,25 @@ export const FaucetRoutes: FastifyPluginAsync<
7474
preHandler: missingBtcConfigMiddleware,
7575
schema: {
7676
operationId: 'run_faucet_btc',
77-
summary: 'Add testnet BTC tokens to address',
78-
description: `Add 0.01 BTC token to the specified testnet BTC address.
77+
summary: 'Add regtest BTC tokens to address',
78+
description: `Add 0.01 BTC token to the specified regtest BTC address.
7979
80-
The endpoint returns the transaction ID, which you can use to view the transaction in a testnet Bitcoin block
80+
The endpoint returns the transaction ID, which you can use to view the transaction in a regtest Bitcoin block
8181
explorer. The tokens are delivered once the transaction has been included in a block.
8282
83-
**Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.`,
83+
**Note:** This is a Bitcoin regtest-only endpoint. This endpoint will not work on the Bitcoin mainnet.`,
8484
tags: ['Faucets'],
8585
querystring: Type.Object({
8686
address: Type.Optional(
8787
Type.String({
88-
description: 'A valid testnet BTC address',
88+
description: 'A valid regtest BTC address',
8989
examples: ['2N4M94S1ZPt8HfxydXzL2P7qyzgVq7MHWts'],
9090
})
9191
),
9292
large: Type.Optional(
9393
Type.Boolean({
9494
description:
95-
'Request a larger amount of testnet BTC than the default',
95+
'Request a larger amount of regtest BTC than the default',
9696
default: false,
9797
})
9898
),
@@ -101,7 +101,7 @@ export const FaucetRoutes: FastifyPluginAsync<
101101
Type.Object({
102102
address: Type.Optional(
103103
Type.String({
104-
description: 'A valid testnet BTC address',
104+
description: 'A valid regtest BTC address',
105105
examples: ['2N4M94S1ZPt8HfxydXzL2P7qyzgVq7MHWts'],
106106
})
107107
),
@@ -119,7 +119,7 @@ export const FaucetRoutes: FastifyPluginAsync<
119119
{
120120
title: 'RunFaucetResponse',
121121
description:
122-
'POST request that initiates a transfer of tokens to a specified testnet address',
122+
'POST request that initiates a transfer of tokens to a specified Bitcoin regtest address',
123123
}
124124
),
125125
'4xx': Type.Object({
@@ -132,7 +132,7 @@ export const FaucetRoutes: FastifyPluginAsync<
132132
async (req, reply) => {
133133
await btcFaucetRequestQueue.add(async () => {
134134
const address = req.query.address || req.body?.address;
135-
const tbtcAmount = req.query.large ? 0.5 : 0.01;
135+
const btcAmount = req.query.large ? 0.5 : 0.01;
136136
if (!address) {
137137
return await reply.status(400).send({
138138
error: 'address required',
@@ -164,7 +164,7 @@ export const FaucetRoutes: FastifyPluginAsync<
164164
});
165165
}
166166

167-
const tx = await makeBtcFaucetPayment(btc.networks.regtest, address, tbtcAmount);
167+
const tx = await makeBtcFaucetPayment(btc.networks.regtest, address, btcAmount);
168168
await fastify.writeDb?.insertFaucetRequest({
169169
ip: `${ip}`,
170170
address: address,
@@ -191,7 +191,7 @@ export const FaucetRoutes: FastifyPluginAsync<
191191
tags: ['Faucets'],
192192
params: Type.Object({
193193
address: Type.String({
194-
description: 'A valid testnet BTC address',
194+
description: 'A valid regtest BTC address',
195195
examples: ['2N4M94S1ZPt8HfxydXzL2P7qyzgVq7MHWts'],
196196
}),
197197
}),

0 commit comments

Comments
 (0)