Skip to content

Commit 38b384c

Browse files
committed
Fix type error and possibly undefined object access on index route
1 parent 8a7d8fc commit 38b384c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/mobile-app/app/(tabs)/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function Balances() {
99
const [account, setAccount] = useState<string>("");
1010

1111
const getTransactionsResult = facade.getTransactions.useQuery(
12-
{ accountName: account, hash: "" },
12+
{ accountName: account },
1313
{
1414
refetchInterval: 1000,
1515
},
@@ -18,7 +18,7 @@ export default function Balances() {
1818
const getAccountsResult = facade.getAccounts.useQuery();
1919

2020
useEffect(() => {
21-
if (getAccountsResult.data) {
21+
if (getAccountsResult.data?.[0]) {
2222
setAccount(getAccountsResult.data[0].name);
2323
}
2424
}, [getAccountsResult.data]);

0 commit comments

Comments
 (0)