mirror of
https://github.com/Qortal/qortal-mobile.git
synced 2025-05-30 05:06:59 +00:00
fixes
This commit is contained in:
parent
44a2675c87
commit
cfa4afc506
20
src/App.tsx
20
src/App.tsx
@ -855,6 +855,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
|
||||
@ -1639,7 +1657,7 @@ function App() {
|
||||
{balance?.toFixed(2)} QORT
|
||||
</TextP>
|
||||
<RefreshIcon
|
||||
onClick={getBalanceFunc}
|
||||
onClick={getBalanceAndUserInfoFunc}
|
||||
sx={{
|
||||
fontSize: "16px",
|
||||
color: "white",
|
||||
|
@ -798,7 +798,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 '';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user