Skip to content

Commit

Permalink
improve language / fix more bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
pdaoust committed Dec 19, 2024
1 parent f7d868b commit 4458a61
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/pages/resources/upgrade/upgrade-holochain-0.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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
});
Expand All @@ -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:
Expand Down

0 comments on commit 4458a61

Please sign in to comment.