Skip to content

Commit a24083b

Browse files
committed
refactor(abstract-lightning): convert to bigint for invoice limit
BTC-1773 TICKET: BTC-1773
1 parent 574b3c4 commit a24083b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export type InvoiceInfo = t.TypeOf<typeof InvoiceInfo>;
265265
export const InvoiceQuery = t.partial(
266266
{
267267
status: InvoiceStatus,
268-
limit: t.string,
268+
limit: BigIntFromString,
269269
startDate: DateFromISOString,
270270
endDate: DateFromISOString,
271271
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export type CreateInvoiceRequest = t.TypeOf<typeof CreateInvoiceRequest>;
5151

5252
export const GetInvoicesQuery = t.partial({
5353
status: InvoiceStatus,
54-
limit: t.string,
54+
limit: BigIntFromString,
5555
startDate: DateFromISOString,
5656
endDate: DateFromISOString,
5757
});

modules/bitgo/test/v2/unit/lightning/lightningWallets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ describe('Lightning wallets', function () {
206206
createdAt: new Date(),
207207
updatedAt: new Date(),
208208
};
209-
const query = { status: 'open', startDate: new Date() } as GetInvoicesQuery;
209+
const query = { status: 'open', startDate: new Date(), limit: 100n } as GetInvoicesQuery;
210210
const listInvoicesNock = nock(bgUrl)
211211
.get(`/api/v2/${coinName}/wallet/${wallet.wallet.id()}/lightning/invoice`)
212212
.query(GetInvoicesQuery.encode(query))

0 commit comments

Comments
 (0)