From b5741b9789520e96e38e325ad791aa714ff4ba31 Mon Sep 17 00:00:00 2001 From: Eric Farber Date: Tue, 9 May 2023 16:21:02 -0400 Subject: [PATCH 1/2] call getUserBalances in hubs releasePurchase --- js/hubs/components/ReleasePurchase.js | 5 +++++ js/web/components/ReleasePurchase.js | 3 +++ 2 files changed, 8 insertions(+) diff --git a/js/hubs/components/ReleasePurchase.js b/js/hubs/components/ReleasePurchase.js index 2e3d1fb50..e150f324e 100644 --- a/js/hubs/components/ReleasePurchase.js +++ b/js/hubs/components/ReleasePurchase.js @@ -57,6 +57,7 @@ const ReleasePurchase = (props) => { checkIfHasBalanceToCompleteAction, solBalance, NinaProgramAction, + getUserBalances, } = useContext(Nina.Context) const [release, setRelease] = useState(undefined) const [userIsRecipient, setUserIsRecipient] = useState(false) @@ -73,6 +74,10 @@ const ReleasePurchase = (props) => { [releasePubkey, releasePurchasePending] ) + useEffect(() => { + getUserBalances() + }, []) + const isAuthority = useMemo(() => { if (wallet.connected) { return release?.authority === wallet?.publicKey.toBase58() diff --git a/js/web/components/ReleasePurchase.js b/js/web/components/ReleasePurchase.js index a0e6c5345..72d8d8b83 100644 --- a/js/web/components/ReleasePurchase.js +++ b/js/web/components/ReleasePurchase.js @@ -137,6 +137,9 @@ const ReleasePurchase = (props) => { ) }, [exchangeState]) + + console.log('solBalance :>> ', solBalance); + useEffect(() => { if (metadata?.descriptionHtml) { unified() From 542e0813725aa9cb53a0fb85e5894042d204dc67 Mon Sep 17 00:00:00 2001 From: Eric Farber Date: Tue, 9 May 2023 16:26:10 -0400 Subject: [PATCH 2/2] remove log --- js/web/components/ReleasePurchase.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/js/web/components/ReleasePurchase.js b/js/web/components/ReleasePurchase.js index 72d8d8b83..a0e6c5345 100644 --- a/js/web/components/ReleasePurchase.js +++ b/js/web/components/ReleasePurchase.js @@ -137,9 +137,6 @@ const ReleasePurchase = (props) => { ) }, [exchangeState]) - - console.log('solBalance :>> ', solBalance); - useEffect(() => { if (metadata?.descriptionHtml) { unified()