Skip to content

Commit

Permalink
feat: multisig spending condition tests use integers, not BigNums
Browse files Browse the repository at this point in the history
  • Loading branch information
fariedt authored and reedrosenbluth committed Oct 20, 2021
1 parent 0da0fab commit e34ba2e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/transactions/tests/authorization.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ test('Multi sig spending condition uncompressed', () => {
// auth.rs: tx_stacks_spending_condition_p2sh() (compressed multisig)
test('Multi sig P2SH spending condition compressed', () => {
const addressHashMode = AddressHashMode.SerializeP2SH;
const nonce = new BigNum(456);
const fee = new BigNum(567);
const nonce = 456;
const fee = 567;
const pubKey = '03ef2340518b5867b23598a9cf74611f8b98064f7d55cdb8c107c67b5efcbc5c77';
const pubKeys = [pubKey, pubKey, pubKey];

Expand Down Expand Up @@ -210,8 +210,8 @@ test('Multi sig P2SH spending condition compressed', () => {
// auth.rs: tx_stacks_spending_condition_p2wsh()
test('Multi sig P2WSH spending condition compressed', () => {
const addressHashMode = AddressHashMode.SerializeP2WSH;
const nonce = new BigNum(456);
const fee = new BigNum(567);
const nonce = 456;
const fee = 567;
const pubKey = '03ef2340518b5867b23598a9cf74611f8b98064f7d55cdb8c107c67b5efcbc5c77';
const pubKeys = [pubKey, pubKey, pubKey];

Expand Down Expand Up @@ -274,10 +274,10 @@ test('Multi sig P2WSH spending condition compressed', () => {

// auth.rs: tx_stacks_auth()
test('Spending conditions', () => {
const bn123 = new BigNum(123);
const bn345 = new BigNum(345);
const bn456 = new BigNum(456);
const bn567 = new BigNum(567);
const bn123 = 123;
const bn345 = 345;
const bn456 = 456;
const bn567 = 567;
const signer = '11'.repeat(20);
const signatureFF = createMessageSignature('ff'.repeat(65));
const signatureFE = createMessageSignature('fe'.repeat(65));
Expand Down

0 comments on commit e34ba2e

Please sign in to comment.