Closed herou closed 2 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![Screenshot 2021-09-19 at 19 43 51](https://user-images.githubusercontent.com/13895430/133941779-17639bf7-91e7-4ff2-9b6f-34a9f7f59545.png)
into V2. Below I have my translated version but it seems not working:![Screenshot 2021-09-19 at 22 29 08](https://user-images.githubusercontent.com/13895430/133942051-daeeb6e2-e3b2-44be-a55a-427ec34f781c.png)
@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