From 0c99786af0220fe8762f92c1ec6f0bf7fc6f3fe3 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Wed, 25 Oct 2023 14:53:17 -0400 Subject: [PATCH] resolve some todos --- src/createXcmTypes/SystemToPara.spec.ts | 1 - .../util/foreignAssetMultiLocationIsInCacheOrRegistry.ts | 5 +---- src/createXcmTypes/util/sortMultiAssetsAscending.spec.ts | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/createXcmTypes/SystemToPara.spec.ts b/src/createXcmTypes/SystemToPara.spec.ts index bd59b1a7..81fa964b 100644 --- a/src/createXcmTypes/SystemToPara.spec.ts +++ b/src/createXcmTypes/SystemToPara.spec.ts @@ -287,7 +287,6 @@ describe('SystemToPara XcmVersioned Generation', () => { describe('createSystemToParaMultiAssets', () => { it('Should correctly create system multi assets for SystemToPara xcm direction', async () => { - // TODO: This is unsorted, and once the sorting is fixed this test should be switch to ordered assets const expected: FungibleStrMultiAsset[] = [ { fun: { diff --git a/src/createXcmTypes/util/foreignAssetMultiLocationIsInCacheOrRegistry.ts b/src/createXcmTypes/util/foreignAssetMultiLocationIsInCacheOrRegistry.ts index dbf61a4b..c5131567 100644 --- a/src/createXcmTypes/util/foreignAssetMultiLocationIsInCacheOrRegistry.ts +++ b/src/createXcmTypes/util/foreignAssetMultiLocationIsInCacheOrRegistry.ts @@ -35,10 +35,7 @@ const checkForeignAssetExists = ( }); for (const asset of foreignAssets) { - // TODO: How to ensure 2 foreign assets are exactly the same. Best - // to sanitize both then compare. Also what if some value is of a `parents: number` and another - // is of `parents: string`... - + // We sanitize `assets` here since multiLocation is already sanitized. if (JSON.stringify(sanitizeKeys(JSON.parse(asset))) === JSON.stringify(multiLocation)) { return true; } diff --git a/src/createXcmTypes/util/sortMultiAssetsAscending.spec.ts b/src/createXcmTypes/util/sortMultiAssetsAscending.spec.ts index e8ce3980..763d6e3b 100644 --- a/src/createXcmTypes/util/sortMultiAssetsAscending.spec.ts +++ b/src/createXcmTypes/util/sortMultiAssetsAscending.spec.ts @@ -278,7 +278,6 @@ describe('sortMultiAssetsAscending', () => { }); it('Should correctly sort an unsorted multiasset array with in ascending order when parents values are different', () => { - // TODO: verify if the refactor of this test is correct. const multiAssets: FungibleStrMultiAsset[] = [ { fun: {