From 5b7c4e5224e2327d732dfccce1d74f5b143c5dec Mon Sep 17 00:00:00 2001 From: PhilReact Date: Wed, 28 May 2025 18:55:13 +0300 Subject: [PATCH] fixes --- src/App.tsx | 20 +++++++++++++++++++- src/background.ts | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 8f1126a..23c0f97 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -679,6 +679,24 @@ function App() { }); }; + + const refetchUserInfo = () => { + window + .sendMessage('userInfo') + .then((response) => { + if (response && !response.error) { + setUserInfo(response); + } + }) + .catch((error) => { + console.error('Failed to get user info:', error); + }); + }; + + const getBalanceAndUserInfoFunc = () => { + getBalanceFunc(); + refetchUserInfo(); + }; const getLtcBalanceFunc = () => { setLtcBalanceLoading(true); chrome?.runtime?.sendMessage({ action: "ltcBalance" }, (response) => { @@ -1526,7 +1544,7 @@ function App() { {balance?.toFixed(2)} QORT