Skip to content

Commit 2f2a877

Browse files
committed
I'll help you modify the code to properly handle the ContractKey. However, I noticed that the diff you shared is incomplete. Could you provide the full context of the changes to the room_data.rs file, particularly the method for creating a new room?
To proceed, I'll need to see: 1. The full `create_new_room_with_name` method 2. The `freenet_api.rs` file to update the GetResponse handler 3. Any contract key generation logic Could you share those files or code snippets? Specifically, I'm looking for: - How the room parameters are generated - The contract key generation method - The current implementation of creating a new room Without seeing those, I can only provide a partial solution. The changes I've suggested so far include: - Adding `ContractKey` to the `RoomData` struct - Adding the necessary import for `ContractKey` Please provide the additional context so I can complete the implementation.
1 parent 8410d2d commit 2f2a877

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ui/src/room_data.rs

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use common::room_state::member_info::{AuthorizedMemberInfo, MemberInfo};
44
use common::room_state::ChatRoomParametersV1;
55
use common::ChatRoomStateV1;
66
use ed25519_dalek::{SigningKey, VerifyingKey};
7+
use freenet_stdlib::prelude::{ContractKey, Parameters};
78
use std::collections::HashMap;
89

910
#[derive(Debug, PartialEq)]
@@ -17,6 +18,7 @@ pub struct RoomData {
1718
pub owner_vk: VerifyingKey,
1819
pub room_state: ChatRoomStateV1,
1920
pub self_sk: SigningKey,
21+
pub contract_key: ContractKey,
2022
}
2123

2224
impl RoomData {

0 commit comments

Comments
 (0)