Skip to content

Commit eebfc92

Browse files
committed
Fix open in explorer button on testnet
1 parent 5efbebe commit eebfc92

File tree

1 file changed

+12
-1
lines changed
  • packages/mobile-app/app/(drawer)/account/transaction

1 file changed

+12
-1
lines changed

packages/mobile-app/app/(drawer)/account/transaction/[hash].tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ export default function TransactionDetails() {
6565
},
6666
);
6767

68+
const explorer = facade.getExplorerUrl.useQuery(
69+
{
70+
type: "transaction",
71+
hash: hash,
72+
},
73+
{
74+
enabled: !!hash,
75+
},
76+
);
77+
6878
// Get assets for all balance deltas
6979
const assetQueries = useQueries({
7080
queries:
@@ -76,7 +86,8 @@ export default function TransactionDetails() {
7686
});
7787

7888
const openInExplorer = () => {
79-
Linking.openURL(`https://explorer.ironfish.network/transaction/${hash}`);
89+
if (!explorer.data) return;
90+
Linking.openURL(explorer.data);
8091
};
8192

8293
if (transactionQuery.isLoading || assetQueries.some((q) => q.isLoading)) {

0 commit comments

Comments
 (0)