Skip to content

Commit 39cb398

Browse files
authoredFeb 14, 2025··
Merge pull request #45 from BTS-CM/content-layer
Switch to the Astro Content Layer
2 parents 97873df + fba137c commit 39cb398

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1647
-1369
lines changed
 

‎src/components/AccountLists.jsx

+8-18
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ import { useInitCache } from "@/nanoeffects/Init.ts";
3434
import { $currentUser } from "@/stores/users.ts";
3535
import { $currentNode } from "@/stores/node.ts";
3636

37-
import { $globalParamsCacheBTS, $globalParamsCacheTEST } from "@/stores/cache.ts";
38-
3937
import { humanReadableFloat } from "@/lib/common";
4038

4139
import { createObjectStore } from "@/nanoeffects/Objects.ts";
@@ -49,32 +47,24 @@ export default function AccountLists(properties) {
4947
const { t, i18n } = useTranslation(locale.get(), { i18n: i18nInstance });
5048
const currentNode = useStore($currentNode);
5149

52-
const [showDialog, setShowDialog] = useState(false);
50+
const {
51+
_globalParamsBTS,
52+
_globalParamsTEST
53+
} = properties;
5354

55+
const [showDialog, setShowDialog] = useState(false);
5456
const [targetUser, setTargetUser] = useState();
5557

5658
const usr = useSyncExternalStore($currentUser.subscribe, $currentUser.get, () => true);
5759

58-
const _globalParamsBTS = useSyncExternalStore(
59-
$globalParamsCacheBTS.subscribe,
60-
$globalParamsCacheBTS.get,
61-
() => true
62-
);
63-
64-
const _globalParamsTEST = useSyncExternalStore(
65-
$globalParamsCacheTEST.subscribe,
66-
$globalParamsCacheTEST.get,
67-
() => true
68-
);
69-
7060
const _chain = useMemo(() => {
7161
if (usr && usr.chain) {
7262
return usr.chain;
7363
}
7464
return "bitshares";
7565
}, [usr]);
7666

77-
useInitCache(_chain ?? "bitshares", ["globalParams"]);
67+
useInitCache(_chain ?? "bitshares", []);
7868

7969
const globalParams = useMemo(() => {
8070
if (_chain && (_globalParamsBTS || _globalParamsTEST)) {
@@ -86,8 +76,8 @@ export default function AccountLists(properties) {
8676
const [fee, setFee] = useState(0);
8777
useEffect(() => {
8878
if (globalParams && globalParams.length) {
89-
const foundFee = globalParams.find((x) => x[0] === 7); // operation: account_whitelist
90-
const finalFee = humanReadableFloat(foundFee[1].fee, 5);
79+
const foundFee = globalParams.find((x) => x.id === 7); // operation: account_whitelist
80+
const finalFee = humanReadableFloat(foundFee.data.fee, 5);
9181
setFee(finalFee);
9282
}
9383
}, [globalParams]);

‎src/components/AccountSearch.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default function AccountSearch(properties) {
5959
setInProgress(false);
6060

6161
if (response && response.id) {
62-
console.log({ skipCheck, id: response.id, blocklist: blocklist });
62+
//console.log({ skipCheck, id: response.id, blocklist: blocklist });
6363
if (usr.chain === "bitshares" && !skipCheck) {
6464
let hashedID;
6565
try {

0 commit comments

Comments
 (0)
Please sign in to comment.