From 54d3bacbb1a63719736c6034d5ba611ecf411a3d Mon Sep 17 00:00:00 2001 From: ankushKun Date: Wed, 22 May 2024 12:05:29 +0530 Subject: [PATCH] project owner wallet updation --- next_app/src/components/bottom-tab-bar.tsx | 15 +++++++++------ next_app/src/components/layout.tsx | 2 +- next_app/src/components/settings-tab.tsx | 5 +++-- next_app/src/hooks/useProjectManager.tsx | 3 ++- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/next_app/src/components/bottom-tab-bar.tsx b/next_app/src/components/bottom-tab-bar.tsx index 2418476..27f34a6 100644 --- a/next_app/src/components/bottom-tab-bar.tsx +++ b/next_app/src/components/bottom-tab-bar.tsx @@ -50,6 +50,9 @@ export default function BottomTabBar({ collapsed, toggle }: { collapsed: boolean async function fetchNewInbox() { if (globalState.activeMode == "WARP") return; if (!project || !project.process) return; + const ownerWallet = project.ownerWallet; + const activeWallet = await window.arweaveWallet.getActiveAddress(); + if (ownerWallet != activeWallet) return; // console.log("ran"); const cursor = sessionStorage.getItem("cursor") || ""; const r = await getResults(project.process, cursor); @@ -96,12 +99,12 @@ export default function BottomTabBar({ collapsed, toggle }: { collapsed: boolean { name: "File-Type", value: "Inbox" } ]); setInbox(JSON.parse(result.Output.data.output).reverse()); - const r = await dryrun({ - process: pid, - code: "require('json').encode(Inbox)", - tags: [{ name: "Action", value: "Eval" }, { name: "File-Type", value: "Inbox" }], - }) - console.log(r) + // const r = await dryrun({ + // process: pid, + // code: "return require('json').encode(Inbox)", + // tags: [{ name: "Action", value: "Eval" }, { name: "File-Type", value: "Inbox" }], + // }) + // console.log(r) setLoadingInbox(false); } diff --git a/next_app/src/components/layout.tsx b/next_app/src/components/layout.tsx index ae41b3c..16b6b0e 100644 --- a/next_app/src/components/layout.tsx +++ b/next_app/src/components/layout.tsx @@ -420,7 +420,7 @@ $$\\int_a^b f'(x) dx = f(b)- f(a)$$`, return ( <> {!isNotebook && file && ( -
+