Skip to content

Commit 8acb9d0

Browse files
committed
feat: poc shielded sync
1 parent 8869568 commit 8acb9d0

File tree

6 files changed

+507
-376
lines changed

6 files changed

+507
-376
lines changed

apps/namadillo/src/App/Common/AppContainer.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import clsx from "clsx";
2+
import { getSdkInstance } from "hooks";
23
import { useState } from "react";
34
import { Link } from "react-router-dom";
45
import { BurgerButton } from "./BurgerButton";
@@ -10,6 +11,14 @@ type ContainerProps = {
1011
children: JSX.Element;
1112
} & React.ComponentPropsWithoutRef<"div">;
1213

14+
const vk =
15+
"zvknam1qd2rnxg5qqqqpq8s3ejhum4mmr50puzyuuv8klj3" +
16+
"uua76vevh2wnk4mlm7p65zvx9xaadwql4zp7m2vqwkm2yma" +
17+
"jskms5zf8r8gsmmxqq8w43j77kcz69pkyzvsxnjurfhm6tl" +
18+
"cst8wt8jqlw53n593p4ywswuu0058wsfrgjtaaxjh0acztk" +
19+
"mav06dvh3jqslw3ncpcuruy6qsdxpar455d7sza4um75vvc" +
20+
"s6h7sd96mxj6ghv29c6hrly5nh734r2vtpmyuy3rlacujs0l9";
21+
1322
export const AppContainer = ({
1423
header,
1524
navigation,
@@ -18,6 +27,18 @@ export const AppContainer = ({
1827
}: ContainerProps): JSX.Element => {
1928
const [displayNavigation, setDisplayNavigation] = useState(false);
2029

30+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
31+
(window as any)["shieldedSync"] = async () => {
32+
const { rpc } = await getSdkInstance();
33+
await rpc.shieldedSync([vk]);
34+
const asd = await rpc.queryBalance(vk, [
35+
"tnam1qxgfw7myv4dh0qna4hq0xdg6lx77fzl7dcem8h7e",
36+
]);
37+
38+
// eslint-disable-next-line no-console
39+
console.log(asd);
40+
};
41+
2142
return (
2243
<div className="custom-container pb-2" {...props}>
2344
<header className="flex justify-between flex-wrap font-medium pt-4 pb-5 pl-4">

0 commit comments

Comments
 (0)