Having trouble using ic-auth-client in the rust.made some updates to the repo , i am hafving trouble using canister context in src/collections.rs,error info is in reply

incorporating my context for canister is what i am facing problem with,

in this file what i tried is adding he parameters canisters in the functions
fetch_collections_data
get_collection_metadata_from_token_canister

and in the collections page use context for canisters and pass it inside the fetch_collections_data method

but it gives me a weird error like cannot compare state:Canisters with state:Canisters

the error info:
│ │ │ ├╴E can’t compare state::canisters::Canisters with state::canisters::Canisters
│ │ │ │ the trait std::cmp::PartialEq is not implemented for state::canisters::Canisters, which is required by std::rc::Rcstate::canisters::Canisters: std::cmp::PartialEq
│ │ │ │ required for std::rc::Rcstate::canisters::Canisters to implement std::cmp::PartialEq rustc (E0277) [34, 27]
│ │ │ ├╴E this function takes 0 arguments but 1 argument was supplied rustc (E0061) [39, 26]
│ │ │ ├╴E expected 0 arguments, found 1 rust-analyzer (E0107) [39, 48]
// Retrieve Canisters from context
let canisters = use_context::<Rc>().expect(“Canisters context must be provided”);

fuel-dao-frontend-rs-5091c1cf6fc3e19a.js:1 panicked at src/pages/collections.rs:33:52:
Canisters context must be provided

@wiyota please can you help with this

:white_check_mark: Supported on Discord

1 Like