From 4458a61228b39e3793b6a8bddf17d23d985ef61f Mon Sep 17 00:00:00 2001 From: Paul d'Aoust Date: Wed, 18 Dec 2024 16:39:31 -0800 Subject: [PATCH] improve language / fix more bugs --- src/pages/resources/upgrade/upgrade-holochain-0.4.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/pages/resources/upgrade/upgrade-holochain-0.4.md b/src/pages/resources/upgrade/upgrade-holochain-0.4.md index 6f396c049..60314c8d0 100644 --- a/src/pages/resources/upgrade/upgrade-holochain-0.4.md +++ b/src/pages/resources/upgrade/upgrade-holochain-0.4.md @@ -193,7 +193,7 @@ Edit any coordinator zome code that uses functions from `hdk::clone`: #### In JavaScript front-end -Edit any client code that manipulates cloned cells: +Edit any client code that manipulates cloned cells by cell ID to use DNA hash instead: ```diff:typescript import { AppWebsocket, CellId } from "@holochain/client"; @@ -203,7 +203,7 @@ Edit any client code that manipulates cloned cells: async function createChatRoom(name: string) { const { cell_id } = await client.createCloneCell({ - modifiers: {}, + modifiers: { network_seed: name }, name, role_name }); @@ -214,18 +214,16 @@ Edit any client code that manipulates cloned cells: return cell_id; } - function removeChatRoom(cell_id: CellId) { + async function removeChatRoom(cell_id: CellId) { await client.disableCloneCell({ - clone_cell_id: cell_id, -+ clone_cell_id: cell_id[0], - }); - await client.deleteCloneCell({ -- clone_cell_id: cell_id, + clone_cell_id: cell_id[0], }); } ``` +If you're writing an application that uses the admin API, `AdminClient#deleteCloneCell` changes in the same way as `enableCloneCell` and `disableCloneCell`. + ### JavaScript client now receives system signals For JavaScript front ends and Tryorama tests, the signal handler callback for `AppWebsocket.prototype.on("signal", cb)` should now take a [`Signal`](https://github.com/holochain/holochain-client-js/blob/main-0.4/docs/client.signal.md). Update your code to look like this: