Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

People Chain migration: filter FeePaid judgements #4909

Conversation

muharem
Copy link
Contributor

@muharem muharem commented Jun 28, 2024

Filter FeePaid judgements from the Relay Chain, as their deposits will not be migrated to the People Chain.

Comment on lines +62 to +67
let judgements = [];
decodedJson.judgements.forEach((judgement) => {
if (!('feePaid' in judgement[1])) {
judgements.push(judgement);
}
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let judgements = [];
decodedJson.judgements.forEach((judgement) => {
if (!('feePaid' in judgement[1])) {
judgements.push(judgement);
}
});
let judgements = [];
console.log("before: ", decodedJson.judgements);
decodedJson.judgements.forEach((judgement) => {
if (!('feePaid' in judgement[1])) {
judgements.push(judgement);
}
});
console.log("after: ", judgements);

if you log it like ^, you get https://gist.github.com/muharem/41748f9ffb7cc8c58162d7fc0eb9c992

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, both for accounts that only have FeePaid and those that have other judgements.

@joepetrowski joepetrowski merged commit d9c8753 into nacho/people-chain-spec-with-migation Jun 28, 2024
131 of 142 checks passed
@joepetrowski joepetrowski deleted the muharem-people-chain-migration-filter branch June 28, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants