diff --git a/backend/server.js b/backend/server.js index 365c2497ce..8f711c2604 100644 --- a/backend/server.js +++ b/backend/server.js @@ -241,12 +241,15 @@ sbp('okTurtles.data/set', PUBSUB_INSTANCE, createServer(hapi.listener, { // partition const recoveredState = Object.create(null) recoveredState.contracts = Object.create(null) + const channels = sbp('okTurtles.data/get', PUBSUB_INSTANCE).channels await Promise.all(savedStateIndex.split('\x00').map(async (contractID) => { const cpSerialized = await sbp('chelonia/db/get', `_private_cheloniaState_${contractID}`) if (!cpSerialized) return const cp = JSON.parse(cpSerialized) recoveredState[contractID] = cp.contractState recoveredState.contracts[contractID] = cp.cheloniaContractInfo + // Add existing contract IDs to the list of channels + channels.add(contractID) })) Object.assign(sbp('chelonia/rootState'), recoveredState) } diff --git a/package-lock.json b/package-lock.json index 283a5ba2cb..3c5298d79f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "group-income", - "version": "0.5.4", + "version": "0.5.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "group-income", - "version": "0.5.4", + "version": "0.5.6", "license": "AGPL-3.0", "dependencies": { "@babel/core": "7.23.7",