-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ALL-9108 Fix tatum connector undefined error (#1134)
* ALL-9108 Fix tatum connector undefined error * ALL-9108 Implement feedback from Filip * ALL-9108 Refactor and fix some existing tests * ALL-9108 Fix further tests --------- Co-authored-by: juraj.bacovcin <[email protected]>
- Loading branch information
1 parent
6ff4ab2
commit 7ad7dec
Showing
18 changed files
with
135 additions
and
88 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,25 +1,38 @@ | ||
import { Network, TatumSDK, Ton } from '../../../service' | ||
import { e2eUtil } from '../../e2e.util' | ||
|
||
const getTonClient = async (testnet: boolean) => { | ||
const getTonClient = async (testnet?: boolean) => { | ||
return await TatumSDK.init<Ton>(e2eUtil.initConfig(testnet ? Network.TON_TESTNET : Network.TON)) | ||
} | ||
|
||
describe('Ton', () => { | ||
[true, false].forEach(testnet => { | ||
describe(testnet ? 'Testnet' : 'Mainnet', () => { | ||
it('status', async () => { | ||
const ton = await getTonClient(testnet) | ||
const result = await ton.rpc.getBlockchainMasterchainHead() | ||
await ton.destroy() | ||
expect(result).toBeDefined() | ||
}) | ||
it('getMasterchainInfo', async () => { | ||
const ton = await getTonClient(testnet) | ||
const result = await ton.rpc.getMasterchainInfo() | ||
await ton.destroy() | ||
expect(result).toBeDefined() | ||
}) | ||
describe('Testnet', () => { | ||
it('Ton V2 API - status', async () => { | ||
const ton = await getTonClient(true) | ||
const result = await ton.rpc.getBlockchainMasterchainHead() | ||
await ton.destroy() | ||
expect(result).toBeDefined() | ||
}) | ||
it('Ton Http API - getMasterchainInfo', async () => { | ||
const ton = await getTonClient(true) | ||
const result = await ton.rpc.getMasterchainInfo() | ||
await ton.destroy() | ||
expect(result).toBeDefined() | ||
}) | ||
}) | ||
|
||
describe('Mainnet', () => { | ||
it.skip('Ton V2 API - status', async () => { | ||
const ton = await getTonClient() | ||
const result = await ton.rpc.getBlockchainMasterchainHead() | ||
await ton.destroy() | ||
expect(result).toBeDefined() | ||
}) | ||
it('Ton Http API - getMasterchainInfo', async () => { | ||
const ton = await getTonClient() | ||
const result = await ton.rpc.getMasterchainInfo() | ||
await ton.destroy() | ||
expect(result).toBeDefined() | ||
}) | ||
}) | ||
}) |
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
Oops, something went wrong.