Skip to content

Commit

Permalink
Fix merging of token updates from the Registry (#5185)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Jan 16, 2024
1 parent 78b9c69 commit 6b85443
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/openchat-agent/src/services/openchatAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2802,7 +2802,7 @@ export class OpenChatAgent extends EventTarget {
const updated = {
lastUpdated: updates.lastUpdated,
tokenDetails: distinctBy(
[...updates.tokenDetails, ...(current?.tokenDetails ?? [])],
[...(current?.tokenDetails ?? []), ...updates.tokenDetails],
(t) => t.ledger,
),
nervousSystemSummary: distinctBy(
Expand Down
2 changes: 1 addition & 1 deletion frontend/openchat-agent/src/utils/registryCache.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { openDB, type DBSchema, type IDBPDatabase } from "idb";
import type { RegistryValue } from "openchat-shared";

const CACHE_VERSION = 7;
const CACHE_VERSION = 8;
const KEY = "registry";

let db: RegistryDatabase | undefined;
Expand Down

0 comments on commit 6b85443

Please sign in to comment.