From d9c8753b0d44b44dcf00e8e59f75f2c3e25cc2f6 Mon Sep 17 00:00:00 2001 From: Muharem Date: Fri, 28 Jun 2024 13:57:35 +0200 Subject: [PATCH] People Chain migration: filter `FeePaid ` judgements (#4909) Filter `FeePaid` judgements from the Relay Chain, as their deposits will not be migrated to the People Chain. --- .../migrate_storage_to_genesis/identityMigration.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cumulus/scripts/migrate_storage_to_genesis/identityMigration.js b/cumulus/scripts/migrate_storage_to_genesis/identityMigration.js index 3f577abb4d87..9917b1306963 100644 --- a/cumulus/scripts/migrate_storage_to_genesis/identityMigration.js +++ b/cumulus/scripts/migrate_storage_to_genesis/identityMigration.js @@ -59,6 +59,13 @@ const migrateIdentity = async (key, data, api) => { } }); + let judgements = []; + decodedJson.judgements.forEach((judgement) => { + if (!('feePaid' in judgement[1])) { + judgements.push(judgement); + } + }); + // Migrate `IdentityInfo` data to the new format: // - remove `additional` field // - add `discord` field @@ -68,7 +75,7 @@ const migrateIdentity = async (key, data, api) => { '(RegistrationNew, Option)', [ { - judgements: decodedJson.judgements, + judgements: judgements, deposit: 0, info: { display: decodedJson.info.display,