@@ -176,7 +176,7 @@ export class LightningWallet implements ILightningWallet {
176176
177177 async createInvoice ( params : CreateInvoiceBody ) : Promise < Invoice > {
178178 const createInvoiceResponse = await this . wallet . bitgo
179- . post ( this . wallet . baseCoin . url ( `/wallet/${ this . wallet . id ( ) } /lightning/invoice` ) )
179+ . post ( this . wallet . bitgo . url ( `/wallet/${ this . wallet . id ( ) } /lightning/invoice` , 2 ) )
180180 . send ( t . exact ( CreateInvoiceBody ) . encode ( params ) )
181181 . result ( ) ;
182182 return sdkcore . decodeOrElse ( Invoice . name , Invoice , createInvoiceResponse , ( error ) => {
@@ -187,7 +187,7 @@ export class LightningWallet implements ILightningWallet {
187187
188188 async getInvoice ( paymentHash : string ) : Promise < InvoiceInfo > {
189189 const response = await this . wallet . bitgo
190- . get ( this . wallet . baseCoin . url ( `/wallet/${ this . wallet . id ( ) } /lightning/invoice/${ paymentHash } ` ) )
190+ . get ( this . wallet . bitgo . url ( `/wallet/${ this . wallet . id ( ) } /lightning/invoice/${ paymentHash } ` , 2 ) )
191191 . result ( ) ;
192192 return decodeOrElse ( InvoiceInfo . name , InvoiceInfo , response , ( error ) => {
193193 throw new Error ( `Invalid get invoice response ${ error } ` ) ;
@@ -197,7 +197,7 @@ export class LightningWallet implements ILightningWallet {
197197 async listInvoices ( params : InvoiceQuery ) : Promise < InvoiceInfo [ ] > {
198198 const returnCodec = t . array ( InvoiceInfo ) ;
199199 const createInvoiceResponse = await this . wallet . bitgo
200- . get ( this . wallet . baseCoin . url ( `/wallet/${ this . wallet . id ( ) } /lightning/invoice` ) )
200+ . get ( this . wallet . bitgo . url ( `/wallet/${ this . wallet . id ( ) } /lightning/invoice` , 2 ) )
201201 . query ( InvoiceQuery . encode ( params ) )
202202 . result ( ) ;
203203 return sdkcore . decodeOrElse ( returnCodec . name , returnCodec , createInvoiceResponse , ( error ) => {
@@ -264,7 +264,7 @@ export class LightningWallet implements ILightningWallet {
264264
265265 async getPayment ( paymentHash : string ) : Promise < PaymentInfo > {
266266 const response = await this . wallet . bitgo
267- . get ( this . wallet . baseCoin . url ( `/wallet/${ this . wallet . id ( ) } /lightning/payment/${ paymentHash } ` ) )
267+ . get ( this . wallet . bitgo . url ( `/wallet/${ this . wallet . id ( ) } /lightning/payment/${ paymentHash } ` , 2 ) )
268268 . result ( ) ;
269269 return decodeOrElse ( PaymentInfo . name , PaymentInfo , response , ( error ) => {
270270 throw new Error ( `Invalid payment response: ${ error } ` ) ;
@@ -273,7 +273,7 @@ export class LightningWallet implements ILightningWallet {
273273
274274 async listPayments ( params : PaymentQuery ) : Promise < PaymentInfo [ ] > {
275275 const response = await this . wallet . bitgo
276- . get ( this . wallet . baseCoin . url ( `/wallet/${ this . wallet . id ( ) } /lightning/payment` ) )
276+ . get ( this . wallet . bitgo . url ( `/wallet/${ this . wallet . id ( ) } /lightning/payment` , 2 ) )
277277 . query ( PaymentQuery . encode ( params ) )
278278 . result ( ) ;
279279 return decodeOrElse ( t . array ( PaymentInfo ) . name , t . array ( PaymentInfo ) , response , ( error ) => {
@@ -283,7 +283,7 @@ export class LightningWallet implements ILightningWallet {
283283
284284 async getTransaction ( txId : string ) : Promise < Transaction > {
285285 const response = await this . wallet . bitgo
286- . get ( this . wallet . baseCoin . url ( `/wallet/${ this . wallet . id ( ) } /lightning/transaction/${ txId } ` ) )
286+ . get ( this . wallet . bitgo . url ( `/wallet/${ this . wallet . id ( ) } /lightning/transaction/${ txId } ` , 2 ) )
287287 . result ( ) ;
288288 return decodeOrElse ( Transaction . name , Transaction , response , ( error ) => {
289289 throw new Error ( `Invalid transaction response: ${ error } ` ) ;
@@ -292,7 +292,7 @@ export class LightningWallet implements ILightningWallet {
292292
293293 async listTransactions ( params : TransactionQuery ) : Promise < Transaction [ ] > {
294294 const response = await this . wallet . bitgo
295- . get ( this . wallet . baseCoin . url ( `/wallet/${ this . wallet . id ( ) } /lightning/transaction` ) )
295+ . get ( this . wallet . bitgo . url ( `/wallet/${ this . wallet . id ( ) } /lightning/transaction` , 2 ) )
296296 . query ( TransactionQuery . encode ( params ) )
297297 . result ( ) ;
298298 return decodeOrElse ( t . array ( Transaction ) . name , t . array ( Transaction ) , response , ( error ) => {
0 commit comments