-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove unwrap from the migration
- Loading branch information
Showing
4 changed files
with
110 additions
and
146 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,56 @@ | ||
// import { afterAll, beforeAll, beforeEach, describe, test } from 'bun:test'; | ||
// import { TRANSFER_AMOUNTS } from '@/constants'; | ||
// import { createChainManager } from '@/managers/Factory'; | ||
// import { polimec_storage } from '@/polimec'; | ||
// import { ChainSetup } from '@/setup'; | ||
// import { PolimecToHubTransfer } from '@/transfers/PolimecToHub'; | ||
// import { Accounts, Asset, AssetSourceRelation, Chains } from '@/types'; | ||
import { afterAll, beforeAll, beforeEach, describe, test } from 'bun:test'; | ||
import { TRANSFER_AMOUNTS } from '@/constants'; | ||
import { createChainManager } from '@/managers/Factory'; | ||
import { polimec_storage } from '@/polimec'; | ||
import { ChainSetup } from '@/setup'; | ||
import { PolimecToHubTransfer } from '@/transfers/PolimecToHub'; | ||
import { Accounts, Asset, AssetSourceRelation, Chains } from '@/types'; | ||
|
||
// describe('Polimec -> Hub Transfer Tests', () => { | ||
// const sourceManager = createChainManager(Chains.Polimec); | ||
// const destManager = createChainManager(Chains.PolkadotHub); | ||
// const transferTest = new PolimecToHubTransfer(sourceManager, destManager); | ||
// const chainSetup = new ChainSetup(); | ||
describe('Polimec -> Hub Transfer Tests', () => { | ||
const sourceManager = createChainManager(Chains.Polimec); | ||
const destManager = createChainManager(Chains.PolkadotHub); | ||
const transferTest = new PolimecToHubTransfer(sourceManager, destManager); | ||
const chainSetup = new ChainSetup(); | ||
|
||
// beforeAll(async () => await chainSetup.initialize(polimec_storage)); | ||
// beforeEach(() => { | ||
// sourceManager.connect(); | ||
// destManager.connect(); | ||
// }); | ||
// afterAll(async () => await chainSetup.cleanup()); | ||
beforeAll(async () => await chainSetup.initialize(polimec_storage)); | ||
beforeEach(() => { | ||
sourceManager.connect(); | ||
destManager.connect(); | ||
}); | ||
afterAll(async () => await chainSetup.cleanup()); | ||
|
||
// async function getBalance(account: Accounts, asset: Asset) { | ||
// return await sourceManager.getAssetBalanceOf(account, asset); | ||
// } | ||
// test('Balance query', () => getBalance(Accounts.BOB, Asset.USDT), { timeout: 250000000 }); | ||
async function getBalance(account: Accounts, asset: Asset) { | ||
return await sourceManager.getAssetBalanceOf(account, asset); | ||
} | ||
test('Balance query', () => getBalance(Accounts.BOB, Asset.USDT), { timeout: 250000000 }); | ||
|
||
// test( | ||
// 'Send USDC to Hub', | ||
// () => | ||
// transferTest.testTransfer({ | ||
// amount: TRANSFER_AMOUNTS.TOKENS, | ||
// account: Accounts.BOB, | ||
// asset: Asset.USDC, | ||
// assetSourceRelation: AssetSourceRelation.Sibling, | ||
// }), | ||
// { timeout: 25000 }, | ||
// ); | ||
test( | ||
'Send USDC to Hub', | ||
() => | ||
transferTest.testTransfer({ | ||
account: Accounts.BOB, | ||
assets: [[Asset.USDC, TRANSFER_AMOUNTS.TOKENS, AssetSourceRelation.Sibling]] | ||
}), | ||
{ timeout: 25000 }, | ||
); | ||
|
||
// test( | ||
// 'Send USDT to Hub', | ||
// () => | ||
// transferTest.testTransfer({ | ||
// amount: TRANSFER_AMOUNTS.TOKENS, | ||
// account: Accounts.BOB, | ||
// asset: Asset.USDT, | ||
// assetSourceRelation: AssetSourceRelation.Sibling, | ||
// }), | ||
// { timeout: 25000 }, | ||
// ); | ||
test( | ||
'Send USDT to Hub', | ||
() => | ||
transferTest.testTransfer({ | ||
account: Accounts.BOB, | ||
assets: [[Asset.USDT, TRANSFER_AMOUNTS.TOKENS, AssetSourceRelation.Sibling]] | ||
}), | ||
{ timeout: 25000 }, | ||
); | ||
|
||
// test( | ||
// 'Send DOT to Hub', | ||
// () => | ||
// transferTest.testTransfer({ | ||
// amount: TRANSFER_AMOUNTS.NATIVE, | ||
// account: Accounts.BOB, | ||
// asset: Asset.DOT, | ||
// assetSourceRelation: AssetSourceRelation.Parent, | ||
// }), | ||
// { timeout: 25000 }, | ||
// ); | ||
// }); | ||
test( | ||
'Send DOT to Hub', | ||
() => | ||
transferTest.testTransfer({ | ||
account: Accounts.BOB, | ||
assets: [[Asset.DOT, TRANSFER_AMOUNTS.NATIVE, AssetSourceRelation.Parent]] | ||
}), | ||
{ timeout: 25000 }, | ||
); | ||
}); |
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