Skip to content

Commit

Permalink
Fixed getAllDeletes signature
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Jul 4, 2024
1 parent 73d0fbb commit 5c41be4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/signals/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@holochain-open-dev/signals",
"version": "0.300.2",
"version": "0.300.3",
"description": "Holochain async-signals to build reusable holochain-open-dev modules",
"author": "[email protected]",
"main": "dist/index.js",
Expand Down
19 changes: 10 additions & 9 deletions packages/signals/src/holochain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export function immutableEntrySignal<T>(
});
} else {
if (retries < maxRetries) {
setTimeout(() => tryFetch, pollInterval);
setTimeout(() => tryFetch(), pollInterval);
} else {
signal.set({
status: 'error',
Expand All @@ -196,7 +196,7 @@ export function immutableEntrySignal<T>(
})
.catch(error => {
if (retries < maxRetries) {
setTimeout(() => tryFetch, pollInterval);
setTimeout(() => tryFetch(), pollInterval);
} else {
signal.set({
status: 'error',
Expand Down Expand Up @@ -453,13 +453,14 @@ export function deletesForEntrySignal<
}
});
if (
!deletes ||
!areArrayHashesEqual(
deletes.map(d => d.hashed.hash),
ndeletes.map(d => d.hashed.hash),
)
ndeletes &&
(!deletes ||
!areArrayHashesEqual(
deletes.map(d => d.hashed.hash),
ndeletes.map(d => d.hashed.hash),
))
) {
deletes = ndeletes;
deletes = uniquifyActions(ndeletes);
signal.set({
status: 'completed',
value: deletes,
Expand All @@ -483,7 +484,7 @@ export function deletesForEntrySignal<
originalActionHash.toString()
) {
const lastDeletes = deletes ? deletes : [];
deletes = [...lastDeletes, hcSignal.action];
deletes = uniquifyActions([...lastDeletes, hcSignal.action]);
signal.set({
status: 'completed',
value: deletes,
Expand Down

0 comments on commit 5c41be4

Please sign in to comment.