Skip to content

Commit eeee730

Browse files
Merge pull request #5753 from BitGo/BTC-0.fix-path
fix(abstract-lightning): nest intent
2 parents 2c7db3d + bba99ce commit eeee730

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

modules/abstract-lightning/src/wallet/lightning.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -215,22 +215,24 @@ export class LightningWallet implements ILightningWallet {
215215
this.wallet.bitgo.decrypt({ password: params.passphrase, input: userAuthKey.encryptedPrv })
216216
);
217217

218-
const paymentIntent: LightningPaymentIntent = {
219-
comment: params.comment,
220-
sequenceId: params.sequenceId,
221-
intentType: 'payment',
222-
signedRequest: {
223-
invoice: params.invoice,
224-
amountMsat: params.amountMsat,
225-
feeLimitMsat: params.feeLimitMsat,
226-
feeLimitRatio: params.feeLimitRatio,
218+
const paymentIntent: { intent: LightningPaymentIntent } = {
219+
intent: {
220+
comment: params.comment,
221+
sequenceId: params.sequenceId,
222+
intentType: 'payment',
223+
signedRequest: {
224+
invoice: params.invoice,
225+
amountMsat: params.amountMsat,
226+
feeLimitMsat: params.feeLimitMsat,
227+
feeLimitRatio: params.feeLimitRatio,
228+
},
229+
signature,
227230
},
228-
signature,
229231
};
230232

231233
const transactionRequestCreate = (await this.wallet.bitgo
232234
.post(this.wallet.bitgo.url('/wallet/' + this.wallet.id() + '/txrequests', 2))
233-
.send(LightningPaymentIntent.encode(paymentIntent))
235+
.send(t.type({ intent: LightningPaymentIntent }).encode(paymentIntent))
234236
.result()) as TxRequest;
235237

236238
if (transactionRequestCreate.state === 'pendingApproval') {

0 commit comments

Comments
 (0)