Skip to content

Conversation

@dhirajs0
Copy link
Contributor

Crowdloan Pallet migration tests
This will close issue #153

WIP- need to fetch the contributors data from child state.

@dhirajs0 dhirajs0 requested a review from x3c41a August 26, 2025 11:17
Comment on lines 53 to 58
const num_active_leases = leasesArray.filter(
(lease: any) =>
lease &&
typeof lease === "object" &&
"isSome" in lease &&
lease.isSome
).length;
Copy link
Contributor

Choose a reason for hiding this comment

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

it smells bad for me, even though I am not a TS expert. You should keep the types to be able to use isSome

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, with types, the defensive checks will not be required.

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.

3 participants