Closed herou closed 3 years ago
https://github.com/herou/recipes/pull/6
You weren't calling the genesis config for the charity pallet. I changed the code slightly to do that, but then I got a challenging compile error
--> pallets/charity/src/tests.rs:99:4
|
99 | .assimilate_storage(&mut t)
| ^^^^^^^^^^^^^^^^^^ method not found in `Result<(), std::string::String>`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0599`.
error: could not compile `charity`
I'm guessing maybe you encountered this since there was some commented code around that area. The solution is to call assimilate_storage
as a static method so you can explicitly tell it the type parameter. I can't say I understand 100% why it couldn't infer the type. I wish it could.
But this trick of calling as a static method is worth knowing.
The title is very descriptive.
I would like to convert this
into V2. Below I have my translated version but it seems not working:
@JoshOrndorff Can you please take a look and tell me what's wrong. I would really appreciate it. Note: Some tests are failing Pallet link: https://github.com/herou/recipes/tree/recipes_pallet_v2/pallets/charity