diff --git a/ui/src/components/app/freenet_api.rs b/ui/src/components/app/freenet_api.rs index e9064f4..1dc6a52 100644 --- a/ui/src/components/app/freenet_api.rs +++ b/ui/src/components/app/freenet_api.rs @@ -105,7 +105,7 @@ impl FreenetApiSynchronizer { match response { HostResponse::ContractResponse(contract_response) => { match contract_response { - ContractResponse::GetResponse { key, state, _ } => { + ContractResponse::GetResponse { key, state, .. } => { // Update rooms with received state if let Ok(room_state) = ciborium::from_reader(state.as_ref()) { let mut rooms = use_context::>(); diff --git a/ui/src/example_data.rs b/ui/src/example_data.rs index 1978400..fbc33ca 100644 --- a/ui/src/example_data.rs +++ b/ui/src/example_data.rs @@ -1,4 +1,9 @@ -use crate::room_data::{RoomData, Rooms}; +use crate::{ + room_data::{RoomData, Rooms}, + util::to_cbor_vec, + constants::ROOM_CONTRACT_WASM, +}; +use freenet_stdlib::prelude::{ContractCode, ContractInstanceId, ContractKey, Parameters}; use crate::util::random_full_name; use common::room_state::ChatRoomParametersV1; use common::{ diff --git a/ui/src/room_data.rs b/ui/src/room_data.rs index 5af68ce..bb7041a 100644 --- a/ui/src/room_data.rs +++ b/ui/src/room_data.rs @@ -128,7 +128,7 @@ impl Rooms { }; let params_bytes = to_cbor_vec(¶meters); let contract_code = ContractCode::from(ROOM_CONTRACT_WASM); - let instance_id = ContractInstanceId::from_params_and_code(params_bytes.into(), contract_code); + let instance_id = ContractInstanceId::from_params_and_code(Parameters::from(params_bytes), contract_code); let contract_key = ContractKey::from(instance_id); let room_data = RoomData {