Skip to content

Commit f14ae3f

Browse files
committed
refactor: updated jsdocs and removed unnecessary casting
TICKET: WP-5444
1 parent 1b717f3 commit f14ae3f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

modules/express/src/lightning/lightningSignerRoutes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export async function handleInitLightningWallet(
6161
req: ExpressApiRouteRequest<'express.lightning.initWallet', 'post'>
6262
): Promise<unknown> {
6363
const bitgo = req.bitgo;
64-
const { coin: coinName, walletId, passphrase, expressHost } = req.decoded as any;
64+
const { coin: coinName, walletId, passphrase, expressHost } = req.decoded;
6565
if (!isLightningCoinName(coinName)) {
6666
throw new ApiResponseError(`Invalid coin ${coinName}. This is not a lightning coin.`, 400);
6767
}

modules/express/src/typedRoutes/api/v2/lightningInitWallet.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import { httpRoute, httpRequest, optional } from '@api-ts/io-ts-http';
33
import { BitgoExpressError } from '../../schemas/error';
44

55
/**
6-
*
6+
* Path parameters for initializing a Lightning wallet
7+
* @property {string} coin - A lightning coin name (e.g, lnbtc).
8+
* @property {string} walletId - The ID of the wallet.
79
*/
810
export const LightningInitWalletParams = {
911
coin: t.string,
@@ -20,8 +22,11 @@ export const LightningInitWalletBody = {
2022
};
2123

2224
/**
23-
* Lightning - Initialize node
25+
* Lightning - This is only used for self-custody lightning. Initialize a newly created Lightning Network Daemon (LND) for the first time.
26+
* Returns the updated wallet with the encrypted admin macaroon in the `coinSpecific` response field.
27+
*
2428
* @operationId express.lightning.initWallet
29+
*
2530
* POST /api/v2/{coin}/wallet/{walletId}/initwallet
2631
*/
2732
export const PostLightningInitWallet = httpRoute({

0 commit comments

Comments
 (0)