Skip to content

Commit

Permalink
chore(express): add return for node unlock
Browse files Browse the repository at this point in the history
TICKET: BTC-000
  • Loading branch information
davidkaplanbitgo committed Feb 27, 2025
1 parent 0e12dca commit 32fd109
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/express/src/lightning/lightningSignerRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export async function handleGetLightningWalletState(req: express.Request): Promi
/**
* Handle the request to unlock a wallet in the signer.
*/
export async function handleUnlockLightningWallet(req: express.Request): Promise<void> {
export async function handleUnlockLightningWallet(req: express.Request): Promise<{ message: string }> {
const coinName = req.params.coin;
if (!isLightningCoinName(coinName)) {
throw new ApiResponseError(`Invalid coin to unlock lightning wallet: ${coinName}`, 400);
Expand All @@ -227,7 +227,8 @@ export async function handleUnlockLightningWallet(req: express.Request): Promise
const lndSignerClient = await LndSignerClient.create(walletId, req.config);
// The passphrase at LND can only accommodate a base64 character set
// For more information, see BTC-1851
return await lndSignerClient.unlockWallet({
await lndSignerClient.unlockWallet({
wallet_password: Buffer.from(passphrase).toString('base64'),
});
return { message: 'ok' };
}

0 comments on commit 32fd109

Please sign in to comment.