diff --git a/explorer/src/pages/AccountDetailsPage.tsx b/explorer/src/pages/AccountDetailsPage.tsx
index 79f34c1c10..b9b0ae77ce 100644
--- a/explorer/src/pages/AccountDetailsPage.tsx
+++ b/explorer/src/pages/AccountDetailsPage.tsx
@@ -28,7 +28,7 @@ import { SlotHashesCard } from "components/account/SlotHashesCard";
import { StakeHistoryCard } from "components/account/StakeHistoryCard";
import { BlockhashesCard } from "components/account/BlockhashesCard";
import { ConfigAccountSection } from "components/account/ConfigAccountSection";
-import { isScamAccount } from "scamRegistry";
+import { useFlaggedAccounts } from "providers/accounts/flagged-accounts";
const TABS_LOOKUP: { [id: string]: Tab } = {
"spl-token:mint": {
@@ -130,7 +130,7 @@ function DetailsSections({ pubkey, tab }: { pubkey: PublicKey; tab?: string }) {
const info = useAccountInfo(address);
const { status } = useCluster();
const location = useLocation();
- const isScam = isScamAccount(address);
+ const { flaggedAccounts } = useFlaggedAccounts();
// Fetch account on load
React.useEffect(() => {
@@ -159,7 +159,7 @@ function DetailsSections({ pubkey, tab }: { pubkey: PublicKey; tab?: string }) {
return (
<>
- {isScam && (
+ {flaggedAccounts.has(address) && (
Warning! This account has been flagged as a scam account. Please be
cautious sending SOL to this account.
diff --git a/explorer/src/providers/accounts/flagged-accounts.tsx b/explorer/src/providers/accounts/flagged-accounts.tsx
new file mode 100644
index 0000000000..bd62a93f7f
--- /dev/null
+++ b/explorer/src/providers/accounts/flagged-accounts.tsx
@@ -0,0 +1,46 @@
+import React from "react";
+
+const initialState = new Map();
+const FlaggedContext = React.createContext