This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #212 from ConsenSys/fix/NFTSDK-000-polygonUrl
NFT-000: fix polygon url
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
integration-test/sdk.polygon.gasstation.test-integration.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { config as loadEnv } from 'dotenv'; | ||
|
||
import axios from 'axios'; | ||
|
||
loadEnv(); | ||
|
||
describe('E2E Test: Sdk (read)', () => { | ||
// fix to avoid axios open handle | ||
beforeEach(async () => { | ||
await process.nextTick(() => {}); | ||
}); | ||
|
||
describe('It should get gas price from gasstation', () => { | ||
it('Should resolve gassation url correctly', async () => { | ||
const { data } = await axios({ | ||
method: 'get', | ||
url: 'https://gasstation.polygon.technology/v2', | ||
}); | ||
const gas = data.fast; | ||
expect(gas).toBeDefined; | ||
expect(gas).toMatchObject({ | ||
maxPriorityFee: expect.anything(), | ||
maxFee: expect.anything(), | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters