Skip to content

Commit c670698

Browse files
committed
fix: remove TinySecp256k1Interface from PaymentCreator
1 parent 4cad59c commit c670698

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/payments/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface Payment {
2929
scriptLeaf?: TaprootLeaf;
3030
witness?: Buffer[];
3131
}
32-
export declare type PaymentCreator = (a: Payment, opts?: PaymentOpts, eccLib?: TinySecp256k1Interface) => Payment;
32+
export declare type PaymentCreator = (a: Payment, opts?: PaymentOpts) => Payment;
3333
export declare type PaymentFunction = () => Payment;
3434
export interface PaymentOpts {
3535
validate?: boolean;

test/payments.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { TinySecp256k1Interface } from '../src/types';
2424
const options = Object.assign({ eccLib }, f.options || {});
2525
it(f.description + ' as expected', () => {
2626
const args = u.preform(f.arguments);
27-
const actual = fn(args, options, eccLib);
27+
const actual = fn(args, options);
2828

2929
u.equate(actual, f.expected, f.arguments);
3030
});
@@ -36,7 +36,6 @@ import { TinySecp256k1Interface } from '../src/types';
3636
Object.assign({}, options, {
3737
validate: false,
3838
}),
39-
eccLib,
4039
);
4140

4241
u.equate(actual, f.expected, f.arguments);
@@ -53,7 +52,7 @@ import { TinySecp256k1Interface } from '../src/types';
5352
const args = u.preform(f.arguments);
5453

5554
assert.throws(() => {
56-
fn(args, options, eccLib);
55+
fn(args, options);
5756
}, new RegExp(f.exception));
5857
},
5958
);

ts_src/payments/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ export interface Payment {
3030
witness?: Buffer[];
3131
}
3232

33-
export type PaymentCreator = (
34-
a: Payment,
35-
opts?: PaymentOpts,
36-
eccLib?: TinySecp256k1Interface,
37-
) => Payment;
33+
export type PaymentCreator = (a: Payment, opts?: PaymentOpts) => Payment;
3834

3935
export type PaymentFunction = () => Payment;
4036

0 commit comments

Comments
 (0)