Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NourAlharithi committed Dec 2, 2024
1 parent c168c87 commit a1ad333
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 33 deletions.
20 changes: 5 additions & 15 deletions tests/placeAndMakeSwiftPerp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,7 @@ describe('place and make swift order', () => {
makerDriftClient.encodeSwiftServerMessage(swiftServerMessage);

const swiftSignature = makerDriftClient.signMessage(
new TextEncoder().encode(
digest(encodedSwiftServerMessage).toString('hex')
),
digest(encodedSwiftServerMessage),
swiftKeypair
);

Expand Down Expand Up @@ -396,9 +394,7 @@ describe('place and make swift order', () => {
makerDriftClient.encodeSwiftServerMessage(swiftServerMessage);

const swiftSignature = makerDriftClient.signMessage(
new TextEncoder().encode(
digest(encodedSwiftServerMessage).toString('hex')
),
digest(encodedSwiftServerMessage),
swiftKeypair
);

Expand Down Expand Up @@ -516,9 +512,7 @@ describe('place and make swift order', () => {
takerDriftClient.encodeSwiftServerMessage(swiftServerMessage);

const swiftSignature = takerDriftClient.signMessage(
new TextEncoder().encode(
digest(encodedSwiftServerMessage).toString('hex')
)
digest(encodedSwiftServerMessage)
);

try {
Expand Down Expand Up @@ -638,9 +632,7 @@ describe('place and make swift order', () => {
makerDriftClient.encodeSwiftServerMessage(swiftServerMessage);

const swiftSignature = makerDriftClient.signMessage(
new TextEncoder().encode(
digest(encodedSwiftServerMessage).toString('hex')
),
digest(encodedSwiftServerMessage),
swiftKeypair
);

Expand Down Expand Up @@ -671,9 +663,7 @@ describe('place and make swift order', () => {
makerDriftClient.encodeSwiftServerMessage(swiftServerMessage2);

const swiftSignature2 = makerDriftClient.signMessage(
new TextEncoder().encode(
digest(encodedSwiftServerMessage).toString('hex')
),
digest(encodedSwiftServerMessage2),
swiftKeypair
);

Expand Down
24 changes: 6 additions & 18 deletions tests/placeAndMakeSwiftPerpBankrun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@ describe('place and make swift order', () => {
makerDriftClient.encodeSwiftServerMessage(swiftServerMessage);

const swiftSignature = makerDriftClient.signMessage(
new TextEncoder().encode(
digest(encodedSwiftServerMessage).toString('hex')
),
digest(encodedSwiftServerMessage),
swiftKeypair
);

Expand Down Expand Up @@ -418,9 +416,7 @@ describe('place and make swift order', () => {
swiftDriftClient.encodeSwiftServerMessage(swiftServerMessage);

const swiftSignature = swiftDriftClient.signMessage(
new TextEncoder().encode(
digest(encodedSwiftServerMessage).toString('hex')
),
digest(encodedSwiftServerMessage),
swiftKeypair
);

Expand Down Expand Up @@ -539,9 +535,7 @@ describe('place and make swift order', () => {
takerDriftClient.encodeSwiftServerMessage(swiftServerMessage);

const swiftSignature = takerDriftClient.signMessage(
new TextEncoder().encode(
digest(encodedSwiftServerMessage).toString('hex')
),
digest(encodedSwiftServerMessage),
swiftKeypair
);

Expand Down Expand Up @@ -620,9 +614,7 @@ describe('place and make swift order', () => {
takerDriftClient.encodeSwiftServerMessage(swiftServerMessage);

const swiftSignature = takerDriftClient.signMessage(
new TextEncoder().encode(
digest(encodedSwiftServerMessage).toString('hex')
),
digest(encodedSwiftServerMessage),
swiftKeypair
);

Expand Down Expand Up @@ -720,9 +712,7 @@ describe('place and make swift order', () => {
makerDriftClient.encodeSwiftServerMessage(swiftServerMessage);

const swiftSignature = makerDriftClient.signMessage(
new TextEncoder().encode(
digest(encodedSwiftServerMessage).toString('hex')
),
digest(encodedSwiftServerMessage),
swiftKeypair
);

Expand Down Expand Up @@ -799,9 +789,7 @@ describe('place and make swift order', () => {
makerDriftClient.encodeSwiftServerMessage(swiftServerMessage);

const swiftSignature = makerDriftClient.signMessage(
new TextEncoder().encode(
digest(encodedSwiftServerMessage).toString('hex')
),
digest(encodedSwiftServerMessage),
swiftKeypair
);

Expand Down

0 comments on commit a1ad333

Please sign in to comment.