Skip to content

Commit

Permalink
Fix bug in args passed into ext construction (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul authored May 30, 2023
1 parent 3e75c9b commit 3f0c3bf
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 49 deletions.
4 changes: 2 additions & 2 deletions src/createXcmCalls/limitedReserveTransferAssets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('limitedReserveTransferAssets', () => {
);

expect(ext.toHex()).toBe(
'0xfc041f080100010100f5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b01010100a10f0104000002043205040091010000000000'
'0xfc041f0801010100a10f0100010100f5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b0104000002043205040091010000000000'
);
});
it('Should correctly construct a tx for when a weightLimit is available', () => {
Expand All @@ -38,7 +38,7 @@ describe('limitedReserveTransferAssets', () => {
);

expect(ext.toHex()).toBe(
'0x0501041f080100010100f5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b01010100a10f01040000020432050400910100000000010000'
'0x0501041f0801010100a10f0100010100f5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b01040000020432050400910100000000010000'
);
});
it('Should error when a api does not support the required pallets', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/createXcmCalls/limitedReserveTransferAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ export const limitedReserveTransferAssets = (
);
const weightLimitType = typeCreator.createWeightLimit(api, weightLimit);

return ext(beneficiary, dest, assets, 0, weightLimitType);
return ext(dest, beneficiary, assets, 0, weightLimitType);
};
2 changes: 1 addition & 1 deletion src/createXcmCalls/limitedTeleportAssets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('limitedTeleportAssets', () => {
);

expect(ext.toHex()).toBe(
'0xfc041f090100010100f5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b01010100a10f0104000002043205040091010000000000'
'0xfc041f0901010100a10f0100010100f5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b0104000002043205040091010000000000'
);
});
it('Should error when a api does not support the required pallets', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/createXcmCalls/limitedTeleportAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ export const limitedTeleportAssets = (
);
const weightLimitType = typeCreator.createWeightLimit(api, weightLimit);

return ext(beneficiary, dest, assets, 0, weightLimitType);
return ext(dest, beneficiary, assets, 0, weightLimitType);
};
2 changes: 1 addition & 1 deletion src/createXcmCalls/reserveTransferAssets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('reserveTransferAssets', () => {
);

expect(ext.toHex()).toBe(
'0xf8041f020100010100f5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b01010100a10f01040000020432050400910100000000'
'0xf8041f0201010100a10f0100010100f5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b01040000020432050400910100000000'
);
});
it('Should error when a api does not support the required pallets', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/createXcmCalls/reserveTransferAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ export const reserveTransferAssets = (
assetIds
);

return ext(beneficiary, dest, assets, 0);
return ext(dest, beneficiary, assets, 0);
};
2 changes: 1 addition & 1 deletion src/createXcmCalls/teleportAssets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('teleportAssets', () => {
);

expect(ext.toHex()).toBe(
'0xf8041f010100010100f5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b01010100a10f01040000020432050400910100000000'
'0xf8041f0101010100a10f0100010100f5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b01040000020432050400910100000000'
);
});
it('Should error when a api does not support the required pallets', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/createXcmCalls/teleportAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ export const teleportAssets = (
assetIds
);

return ext(beneficiary, dest, assets, 0);
return ext(dest, beneficiary, assets, 0);
};
80 changes: 40 additions & 40 deletions src/integrationTests/AssetsTransferApi.spec.ts

Large diffs are not rendered by default.

0 comments on commit 3f0c3bf

Please sign in to comment.