Skip to content

Commit

Permalink
fix tests/hmac addition
Browse files Browse the repository at this point in the history
  • Loading branch information
Velenir committed Dec 13, 2024
1 parent 9ade489 commit 102f719
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion tests/__snapshots__/delta.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ exports[`Delta:methods Get Delta Price 1`] = `
"gasCostBeforeFee": "dynamic_number",
"gasCostUSD": "dynamic_number",
"gasCostUSDBeforeFee": "dynamic_number",
"hmac": "dynamic_hex_string",
"hmac": "dynamic_string",
"partner": "anon",
"partnerFee": 0,
"srcAmount": "1000000000000000000",
Expand Down
4 changes: 2 additions & 2 deletions tests/__snapshots__/partialSdk.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ exports[`ParaSwap SDK: fetching methods: axiosFetcher Get_SwapTxData: Get_SwapTx
"destUSD": "dynamic_number",
"gasCost": "dynamic_number",
"gasCostUSD": "dynamic_number",
"hmac": "dynamic_number",
"hmac": "dynamic_string",
"maxImpactReached": false,
"network": 1,
"partner": "anon",
Expand Down Expand Up @@ -256,7 +256,7 @@ exports[`ParaSwap SDK: fetching methods: fetchFetcher Get_SwapTxData: Get_SwapTx
"destUSD": "dynamic_number",
"gasCost": "dynamic_number",
"gasCostUSD": "dynamic_number",
"hmac": "dynamic_number",
"hmac": "dynamic_string",
"maxImpactReached": false,
"network": 1,
"partner": "anon",
Expand Down
4 changes: 2 additions & 2 deletions tests/__snapshots__/quote.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ exports[`Quote:methods Get Fallback Market Quote for all 2`] = `
"destUSD": "dynamic_number",
"gasCost": "dynamic_number",
"gasCostUSD": "dynamic_number",
"hmac": "dynamic_number",
"hmac": "dynamic_string",
"maxImpactReached": false,
"network": 1,
"partner": "anon",
Expand Down Expand Up @@ -67,7 +67,7 @@ exports[`Quote:methods Get Quote for market 1`] = `
"destUSD": "dynamic_number",
"gasCost": "dynamic_number",
"gasCostUSD": "dynamic_number",
"hmac": "dynamic_number",
"hmac": "dynamic_string",
"maxImpactReached": false,
"network": 1,
"partner": "anon",
Expand Down
4 changes: 2 additions & 2 deletions tests/__snapshots__/simpleSdk.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ exports[`ParaSwap SDK: fetcher made with: axios Get_SwapTxData: Get_SwapTxData::
"destUSD": "dynamic_number",
"gasCost": "dynamic_number",
"gasCostUSD": "dynamic_number",
"hmac": "dynamic_number",
"hmac": "dynamic_string",
"maxImpactReached": false,
"network": 1,
"partner": "anon",
Expand Down Expand Up @@ -236,7 +236,7 @@ exports[`ParaSwap SDK: fetcher made with: fetch Get_SwapTxData: Get_SwapTxData::
"destUSD": "dynamic_number",
"gasCost": "dynamic_number",
"gasCostUSD": "dynamic_number",
"hmac": "dynamic_number",
"hmac": "dynamic_string",
"maxImpactReached": false,
"network": 1,
"partner": "anon",
Expand Down
6 changes: 3 additions & 3 deletions tests/delta.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe('Delta:methods', () => {
gasCostBeforeFee: 'dynamic_number',
gasCostUSD: 'dynamic_number',
gasCostUSDBeforeFee: 'dynamic_number',
hmac: 'dynamic_hex_string',
hmac: 'dynamic_string',
};

expect(staticDeltaPrice).toMatchSnapshot();
Expand Down Expand Up @@ -221,7 +221,7 @@ describe('Delta:methods', () => {
srcAmount: '1000000000000000000',
srcToken: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
srcUSD: '3191.5500000000',
hmac: '0x1234',
hmac: '1234aeb',
};

const slippagePercent = 0.5;
Expand Down Expand Up @@ -411,7 +411,7 @@ describe('Delta:methods', () => {
srcAmount: '1000000000000000000',
srcToken: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
srcUSD: '3191.5500000000',
hmac: '0x1234',
hmac: '1234aeb',
};

const slippagePercent = 0.5;
Expand Down
2 changes: 1 addition & 1 deletion tests/partialSdk.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ describe.each([
...priceRoute,
gasCost: 'dynamic_number',
gasCostUSD: 'dynamic_number',
hmac: 'dynamic_number',
hmac: 'dynamic_string',
destAmount: 'dynamic_number',
blockNumber: 'dynamic_number',
srcUSD: 'dynamic_number',
Expand Down
8 changes: 6 additions & 2 deletions tests/quote.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ describe('Quote:methods', () => {

const staticDeltaPrice: typeof quote.delta = {
...quote.delta,
hmac: 'dynamic_string',
destAmount: 'dynamic_number',
destAmountBeforeFee: 'dynamic_number',
srcUSD: 'dynamic_number',
Expand All @@ -70,6 +71,7 @@ describe('Quote:methods', () => {
"gasCostBeforeFee": "dynamic_number",
"gasCostUSD": "dynamic_number",
"gasCostUSDBeforeFee": "dynamic_number",
"hmac": "dynamic_string",
"partner": "anon",
"partnerFee": 0,
"srcAmount": "100000000000",
Expand Down Expand Up @@ -190,7 +192,7 @@ describe('Quote:methods', () => {
...priceRoute,
gasCost: 'dynamic_number',
gasCostUSD: 'dynamic_number',
hmac: 'dynamic_number',
hmac: 'dynamic_string',
destAmount: 'dynamic_number',
blockNumber: 'dynamic_number',
srcUSD: 'dynamic_number',
Expand Down Expand Up @@ -218,6 +220,7 @@ describe('Quote:methods', () => {

const staticDeltaPrice: typeof quote.delta = {
...quote.delta,
hmac: 'dynamic_string',
destAmount: 'dynamic_number',
destAmountBeforeFee: 'dynamic_number',
srcUSD: 'dynamic_number',
Expand All @@ -240,6 +243,7 @@ describe('Quote:methods', () => {
"gasCostBeforeFee": "dynamic_number",
"gasCostUSD": "dynamic_number",
"gasCostUSDBeforeFee": "dynamic_number",
"hmac": "dynamic_string",
"partner": "anon",
"partnerFee": 0,
"srcAmount": "100000000000",
Expand Down Expand Up @@ -289,7 +293,7 @@ describe('Quote:methods', () => {
...priceRoute,
gasCost: 'dynamic_number',
gasCostUSD: 'dynamic_number',
hmac: 'dynamic_number',
hmac: 'dynamic_string',
destAmount: 'dynamic_number',
blockNumber: 'dynamic_number',
srcUSD: 'dynamic_number',
Expand Down
2 changes: 1 addition & 1 deletion tests/simpleSdk.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ describe.each([
...priceRoute,
gasCost: 'dynamic_number',
gasCostUSD: 'dynamic_number',
hmac: 'dynamic_number',
hmac: 'dynamic_string',
destAmount: 'dynamic_number',
blockNumber: 'dynamic_number',
srcUSD: 'dynamic_number',
Expand Down

0 comments on commit 102f719

Please sign in to comment.