git.delta.rocks / unique-network / refs/commits / 48c1587fa96f

difftreelog

test fix pallet-tokens field name change

Yaroslav Bolyukin2022-09-16parent: #6ca971a.patch.diff
in: master

4 files changed

modifiedtests/src/util/helpers.tsdiffbeforeafterboth
1184 {Value: operationTx as any},1184 {Value: operationTx as any},
1185 );1185 );
11861186
1187 //const events = 1187 //const events =
1188 await expect(submitTransactionExpectFailAsync(sender, scheduleTx)).to.be.rejected;1188 await expect(submitTransactionExpectFailAsync(sender, scheduleTx)).to.be.rejected;
1189 //expect(getGenericResult(events).success).to.be.false;1189 //expect(getGenericResult(events).success).to.be.false;
1190 });1190 });
modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
117 117
118 [balanceKaruraTokenInit] = await getBalance(api, [randomAccount.address]);118 [balanceKaruraTokenInit] = await getBalance(api, [randomAccount.address]);
119 {119 {
120 const {free} = (await api.query.tokens.accounts(randomAccount.addressRaw, {ForeignAsset: 0})).toJSON() as any;120 const {free} = (await api.query.tokens.accounts(randomAccount.addressRaw, {ForeignAssetId: 0})).toJSON() as any;
121 balanceQuartzForeignTokenInit = BigInt(free);121 balanceQuartzForeignTokenInit = BigInt(free);
122 }122 }
123 },123 },
200 await usingApi(200 await usingApi(
201 async (api) => {201 async (api) => {
202 await waitNewBlocks(api, 3);202 await waitNewBlocks(api, 3);
203 const {free} = (await api.query.tokens.accounts(randomAccount.addressRaw, {ForeignAsset: 0})).toJSON() as any;203 const {free} = (await api.query.tokens.accounts(randomAccount.addressRaw, {ForeignAssetId: 0})).toJSON() as any;
204 balanceQuartzForeignTokenMiddle = BigInt(free);204 balanceQuartzForeignTokenMiddle = BigInt(free);
205 205
206 [balanceKaruraTokenMiddle] = await getBalance(api, [randomAccount.address]);206 [balanceKaruraTokenMiddle] = await getBalance(api, [randomAccount.address]);
243 };243 };
244 244
245 const id = {245 const id = {
246 ForeignAsset: 0,246 ForeignAssetId: 0,
247 };247 };
248248
249 const destWeight = 50000000;249 const destWeight = 50000000;
255 255
256 [balanceKaruraTokenFinal] = await getBalance(api, [randomAccount.address]);256 [balanceKaruraTokenFinal] = await getBalance(api, [randomAccount.address]);
257 {257 {
258 const {free} = (await api.query.tokens.accounts(randomAccount.addressRaw, {ForeignAsset: 0})).toJSON() as any;258 const {free} = (await api.query.tokens.accounts(randomAccount.addressRaw, {ForeignAssetId: 0})).toJSON() as any;
259 balanceQuartzForeignTokenFinal = BigInt(free);259 balanceQuartzForeignTokenFinal = BigInt(free);
260 }260 }
261 261
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
117 117
118 [balanceAcalaTokenInit] = await getBalance(api, [randomAccount.address]);118 [balanceAcalaTokenInit] = await getBalance(api, [randomAccount.address]);
119 {119 {
120 const {free} = (await api.query.tokens.accounts(randomAccount.addressRaw, {ForeignAsset: 0})).toJSON() as any;120 const {free} = (await api.query.tokens.accounts(randomAccount.addressRaw, {ForeignAssetId: 0})).toJSON() as any;
121 balanceUniqueForeignTokenInit = BigInt(free);121 balanceUniqueForeignTokenInit = BigInt(free);
122 }122 }
123 },123 },
200 await usingApi(200 await usingApi(
201 async (api) => {201 async (api) => {
202 await waitNewBlocks(api, 3);202 await waitNewBlocks(api, 3);
203 const {free} = (await api.query.tokens.accounts(randomAccount.addressRaw, {ForeignAsset: 0})).toJSON() as any;203 const {free} = (await api.query.tokens.accounts(randomAccount.addressRaw, {ForeignAssetId: 0})).toJSON() as any;
204 balanceUniqueForeignTokenMiddle = BigInt(free);204 balanceUniqueForeignTokenMiddle = BigInt(free);
205 205
206 [balanceAcalaTokenMiddle] = await getBalance(api, [randomAccount.address]);206 [balanceAcalaTokenMiddle] = await getBalance(api, [randomAccount.address]);
243 };243 };
244 244
245 const id = {245 const id = {
246 ForeignAsset: 0,246 ForeignAssetId: 0,
247 };247 };
248248
249 const destWeight = 50000000;249 const destWeight = 50000000;
255 255
256 [balanceAcalaTokenFinal] = await getBalance(api, [randomAccount.address]);256 [balanceAcalaTokenFinal] = await getBalance(api, [randomAccount.address]);
257 {257 {
258 const {free} = (await api.query.tokens.accounts(randomAccount.addressRaw, {ForeignAsset: 0})).toJSON() as any;258 const {free} = (await api.query.tokens.accounts(randomAccount.addressRaw, {ForeignAssetId: 0})).toJSON() as any;
259 balanceUniqueForeignTokenFinal = BigInt(free);259 balanceUniqueForeignTokenFinal = BigInt(free);
260 }260 }
261 261
modifiedtests/src/xcmTransfer.test.tsdiffbeforeafterboth
78 let balanceOnKaruraBefore: bigint;78 let balanceOnKaruraBefore: bigint;
7979
80 await usingApi(async (api) => {80 await usingApi(async (api) => {
81 const {free} = (await api.query.tokens.accounts(alice.addressRaw, {ForeignAsset: 0})).toJSON() as any;81 const {free} = (await api.query.tokens.accounts(alice.addressRaw, {ForeignAssetId: 0})).toJSON() as any;
82 balanceOnKaruraBefore = free;82 balanceOnKaruraBefore = free;
83 }, {provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT)});83 }, {provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT)});
8484
136 await usingApi(async (api) => {136 await usingApi(async (api) => {
137 // todo do something about instant sealing, where there might not be any new blocks137 // todo do something about instant sealing, where there might not be any new blocks
138 await waitNewBlocks(api, 3);138 await waitNewBlocks(api, 3);
139 const {free} = (await api.query.tokens.accounts(alice.addressRaw, {ForeignAsset: 0})).toJSON() as any;139 const {free} = (await api.query.tokens.accounts(alice.addressRaw, {ForeignAssetId: 0})).toJSON() as any;
140 expect(free > balanceOnKaruraBefore).to.be.true;140 expect(free > balanceOnKaruraBefore).to.be.true;
141 }, {provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT)});141 }, {provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT)});
142 });142 });
165 };165 };
166166
167 const id = {167 const id = {
168 ForeignAsset: 0,168 ForeignAssetId: 0,
169 };169 };
170170
171 const amount = TRANSFER_AMOUNT;171 const amount = TRANSFER_AMOUNT;