This commit is contained in:
PhilReact 2025-05-28 18:54:52 +03:00
parent ac0725b712
commit 25695c87b0
2 changed files with 20 additions and 2 deletions

View File

@ -766,6 +766,24 @@ function App() {
balanceSetInterval();
});
};
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);
window
@ -1502,7 +1520,7 @@ function App() {
</TextP>
<RefreshIcon
onClick={getBalanceFunc}
onClick={getBalanceAndUserInfoFunc}
sx={{
fontSize: '16px',
cursor: 'pointer',

View File

@ -808,7 +808,7 @@ export async function getNameInfo() {
const response = await fetch(validApi + '/names/primary/' + address);
const nameData = await response.json();
if (nameData?.name) {
return nameData[0].name;
return nameData.name;
} else {
return '';
}