From 656bcbb4fe7c39e75418a0987037a8ede61feed1 Mon Sep 17 00:00:00 2001 From: hzrd149 Date: Mon, 16 Sep 2024 09:08:44 -0500 Subject: [PATCH] fix clear internal database --- src/views/relays/cache/index.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/views/relays/cache/index.tsx b/src/views/relays/cache/index.tsx index af21278c8..5d699839c 100644 --- a/src/views/relays/cache/index.tsx +++ b/src/views/relays/cache/index.tsx @@ -5,7 +5,6 @@ import { Button, ButtonGroup, ButtonGroupProps, - ButtonProps, Card, CardBody, CardFooter, @@ -22,16 +21,15 @@ import { Text, useDisclosure, } from "@chakra-ui/react"; -import { CacheRelay } from "nostr-idb"; +import { CacheRelay, clearDB } from "nostr-idb"; import { Link as RouterLink } from "react-router-dom"; import BackButton from "../../../components/router/back-button"; -import { NOSTR_RELAY_TRAY_URL, checkNostrRelayTray, localRelay } from "../../../services/local-relay"; +import { NOSTR_RELAY_TRAY_URL, checkNostrRelayTray, localDatabase, localRelay } from "../../../services/local-relay"; import { ChevronDownIcon, ChevronUpIcon } from "../../../components/icons"; import WasmRelay from "../../../services/wasm-relay"; import MemoryRelay from "../../../classes/memory-relay"; import Trash01 from "../../../components/icons/trash-01"; -import { deleteDatabase } from "../../../services/db"; function EnableWithDelete({ enable, @@ -78,7 +76,7 @@ function InternalRelay() { }; const wipe = async () => { - await deleteDatabase(); + await clearDB(localDatabase); }; return (