From e2aa445bb33f4a17b53f165c8519fc47ad2c4726 Mon Sep 17 00:00:00 2001 From: Paul d'Aoust Date: Wed, 18 Dec 2024 17:11:58 -0800 Subject: [PATCH] update clone cell sample code to reflect the fact that clones are enabled at birth --- .../resources/upgrade/upgrade-holochain-0.4.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/pages/resources/upgrade/upgrade-holochain-0.4.md b/src/pages/resources/upgrade/upgrade-holochain-0.4.md index 60314c8d0..8dae6f2d0 100644 --- a/src/pages/resources/upgrade/upgrade-holochain-0.4.md +++ b/src/pages/resources/upgrade/upgrade-holochain-0.4.md @@ -201,21 +201,15 @@ Edit any client code that manipulates cloned cells by cell ID to use DNA hash in let client: AppClient = await AppWebsocket.connect(); let role_name = "chat"; - async function createChatRoom(name: string) { - const { cell_id } = await client.createCloneCell({ - modifiers: { network_seed: name }, - name, - role_name - }); - await client.enableCloneCell({ + async function archiveChatRoom(cell_id: CellId) { + await client.disableCloneCell({ - clone_cell_id: cell_id, + clone_cell_id: cell_id[0], }); - return cell_id; } - async function removeChatRoom(cell_id: CellId) { - await client.disableCloneCell({ + async function reopenChatRoom(cell_id: CellId) { + await client.enableCloneCell({ - clone_cell_id: cell_id, + clone_cell_id: cell_id[0], });