Skip to content

Commit

Permalink
People Chain migration: filter FeePaid judgements (#4909)
Browse files Browse the repository at this point in the history
Filter `FeePaid` judgements from the Relay Chain, as their deposits will
not be migrated to the People Chain.
  • Loading branch information
muharem authored Jun 28, 2024
1 parent 0a47dc2 commit d9c8753
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -68,7 +75,7 @@ const migrateIdentity = async (key, data, api) => {
'(RegistrationNew, Option<Username>)',
[
{
judgements: decodedJson.judgements,
judgements: judgements,
deposit: 0,
info: {
display: decodedJson.info.display,
Expand Down

0 comments on commit d9c8753

Please sign in to comment.