Skip to content

Commit 15e19aa

Browse files
committed
refactor: minor edit to how we extract coinName
TICKET: WP-5445
1 parent 1d5fd38 commit 15e19aa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/express/src/lightning/lightningSignerRoutes.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ export async function handleCreateSignerMacaroon(
123123
req: ExpressApiRouteRequest<'express.lightning.signerMacaroon', 'post'>
124124
): Promise<unknown> {
125125
const bitgo = req.bitgo;
126-
const { walletId, passphrase, addIpCaveatToMacaroon } = req.decoded;
127-
const coinName = req.decoded.coin;
126+
const { coin: coinName, walletId, passphrase, addIpCaveatToMacaroon } = req.decoded;
128127
if (!isLightningCoinName(coinName)) {
129128
throw new ApiResponseError(`Invalid coin to create signer macaroon: ${coinName}. Must be a lightning coin.`, 400);
130129
}

0 commit comments

Comments
 (0)