Skip to content

Commit

Permalink
I'll help you modify the code to properly handle the ContractKey. How…
Browse files Browse the repository at this point in the history
…ever, 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.
  • Loading branch information
sanity committed Dec 23, 2024
1 parent 8410d2d commit 2f2a877
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/src/room_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use common::room_state::member_info::{AuthorizedMemberInfo, MemberInfo};
use common::room_state::ChatRoomParametersV1;
use common::ChatRoomStateV1;
use ed25519_dalek::{SigningKey, VerifyingKey};
use freenet_stdlib::prelude::{ContractKey, Parameters};
use std::collections::HashMap;

#[derive(Debug, PartialEq)]
Expand All @@ -17,6 +18,7 @@ pub struct RoomData {
pub owner_vk: VerifyingKey,
pub room_state: ChatRoomStateV1,
pub self_sk: SigningKey,
pub contract_key: ContractKey,
}

impl RoomData {
Expand Down

0 comments on commit 2f2a877

Please sign in to comment.