Skip to content

Commit 5b8fc10

Browse files
authored
Merge pull request #84 from GalaxyPay/dev
update deps
2 parents 2c65729 + 826b37e commit 5b8fc10

9 files changed

Lines changed: 110 additions & 99 deletions

File tree

‎package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "algo-tools",
3-
"version": "5.1.3",
3+
"version": "5.1.4",
44
"type": "module",
55
"scripts": {
66
"dev": "vite",
@@ -10,13 +10,13 @@
1010
},
1111
"dependencies": {
1212
"@algorandfoundation/algokit-utils": "^9.2.0",
13-
"@galaxypay/use-wallet-lute": "^1.0.0",
13+
"@galaxypay/use-wallet-lute": "^1.1.0",
1414
"@lucide/vue": "^1.34.0",
1515
"@tailwindcss/vite": "^4.3.3",
1616
"@tanstack/vue-table": "^8.21.3",
1717
"@txnlab/use-wallet-defly": "^5.0.0",
1818
"@txnlab/use-wallet-pera": "^5.0.0",
19-
"@txnlab/use-wallet-vue": "^5.0.0",
19+
"@txnlab/use-wallet-vue": "^5.1.0",
2020
"@vueuse/core": "^14.4.0",
2121
"algosdk": "^3.7.0",
2222
"class-variance-authority": "^0.7.1",

‎pnpm-lock.yaml‎

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ allowBuilds:
44
vue-demi: true
55
minimumReleaseAge: 1440
66
minimumReleaseAgeExclude:
7-
- '@galaxypay/use-wallet-lute@1.0.0'
7+
- "@txnlab/use-wallet-vue@5.1.0"
8+
- "@txnlab/use-wallet@5.1.0"
9+
- "@galaxypay/use-wallet-lute@1.1.0"
10+
- '@galaxypay/lute-connect@3.3.2'
811
overrides:
912
"ws": ">=7.5.10"
1013
"bn.js": ">=4.12.3"

‎src/components/AppSidebar.vue‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import type { SidebarProps } from "@/components/ui/sidebar";
3-
import { networks, tools } from "@/data";
3+
import { networks, useTools } from "@/data";
44
import { NetworkId, useNetwork, useWallet } from "@txnlab/use-wallet-vue";
55
import { set } from "idb-keyval";
66
import { toast } from "vue-sonner";
@@ -10,6 +10,7 @@ const store = useAppStore();
1010
const { activeNetwork, setActiveNetwork } = useNetwork();
1111
const { activeAddress } = useWallet();
1212
const appVersion = __APP_VERSION__;
13+
const tools = useTools();
1314
1415
const props = withDefaults(defineProps<SidebarProps>(), {
1516
collapsible: "icon",
@@ -53,7 +54,7 @@ function showDonate() {
5354
<SidebarGroup>
5455
<SidebarGroupLabel>Tools</SidebarGroupLabel>
5556
<SidebarMenu>
56-
<SidebarMenuItem v-for="item in tools()" :key="item.title">
57+
<SidebarMenuItem v-for="item in tools" :key="item.title">
5758
<SidebarMenuButton size="lg" as-child :tooltip="item.title">
5859
<RouterLink :to="item.path">
5960
<component :is="item.icon" v-if="item.icon" class="mx-2" />

‎src/data/index.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import networks from "./networks.json";
2-
import { tools } from "./tools";
3-
export { vanityAbi } from "./vanityAbi";
4-
5-
const nids = networks.filter((n) => n.networkId).map((n) => n.networkId);
6-
7-
export { networks, nids, tools };
1+
import networks from "./networks.json";
2+
import { useTools } from "./tools";
3+
export { vanityAbi } from "./vanityAbi";
4+
5+
const nids = networks.filter((n) => n.networkId).map((n) => n.networkId);
6+
7+
export { networks, nids, useTools };

‎src/data/tools.ts‎

Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -17,57 +17,60 @@ interface Tool {
1717
path: string;
1818
}
1919

20-
export const tools = () => {
20+
export const useTools = () => {
2121
const { activeNetwork } = useNetwork();
22-
const network = networks.find((n) => n.networkId === activeNetwork.value);
2322

24-
const val: Tool[] = [];
23+
return computed(() => {
24+
const network = networks.find((n) => n.networkId === activeNetwork.value);
2525

26-
if (network?.nftIndexer)
27-
val.push({
28-
title: "ARC200 Assets",
29-
subtitle: "View and send contract-based assets",
30-
icon: Coins,
31-
path: "/arc200",
32-
});
26+
const val: Tool[] = [];
3327

34-
if (network?.inboxRouter || network?.name === "LocalNet")
35-
val.push({
36-
title: "Asset Inbox",
37-
subtitle: "View and claim assets sent to your inbox.",
38-
icon: Download,
39-
path: "/inbox",
40-
});
28+
if (network?.nftIndexer)
29+
val.push({
30+
title: "ARC200 Assets",
31+
subtitle: "View and send contract-based assets",
32+
icon: Coins,
33+
path: "/arc200",
34+
});
4135

42-
val.push(
43-
{
44-
title: "Participation Keys",
45-
subtitle: "For node runners. Manage participation keys.",
46-
icon: Handshake,
47-
path: "/keyreg",
48-
},
49-
{
50-
title: "Opt-Out",
51-
subtitle:
52-
"Manage your minimum balance by opting out of assets and applications (smart contracts).",
53-
icon: LogOut,
54-
path: "/optout",
55-
},
56-
{
57-
title: "Burn Assets",
58-
subtitle: "Burn ASAs or NFTs. Trustlessly. Permenantly.",
59-
icon: Flame,
60-
path: "/burn",
61-
}
62-
);
36+
if (network?.inboxRouter || network?.name === "LocalNet")
37+
val.push({
38+
title: "Asset Inbox",
39+
subtitle: "View and claim assets sent to your inbox.",
40+
icon: Download,
41+
path: "/inbox",
42+
});
6343

64-
if (network?.vanityId)
65-
val.push({
66-
title: "Vanity Marketplace",
67-
subtitle: "Buy and sell vanity addresses.",
68-
icon: CaseUpper,
69-
path: "/vanity",
70-
});
44+
val.push(
45+
{
46+
title: "Participation Keys",
47+
subtitle: "For node runners. Manage participation keys.",
48+
icon: Handshake,
49+
path: "/keyreg",
50+
},
51+
{
52+
title: "Opt-Out",
53+
subtitle:
54+
"Manage your minimum balance by opting out of assets and applications (smart contracts).",
55+
icon: LogOut,
56+
path: "/optout",
57+
},
58+
{
59+
title: "Burn Assets",
60+
subtitle: "Burn ASAs or NFTs. Trustlessly. Permenantly.",
61+
icon: Flame,
62+
path: "/burn",
63+
}
64+
);
7165

72-
return val;
66+
if (network?.vanityId)
67+
val.push({
68+
title: "Vanity Marketplace",
69+
subtitle: "Buy and sell vanity addresses.",
70+
icon: CaseUpper,
71+
path: "/vanity",
72+
});
73+
74+
return val;
75+
});
7376
};

‎src/pages/index.vue‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<script lang="ts" setup>
2-
import { tools } from "@/data";
2+
import { useTools } from "@/data";
33
import { useWallet } from "@txnlab/use-wallet-vue";
44
import { toast } from "vue-sonner";
55
66
const store = useAppStore();
7+
const tools = useTools();
78
const { activeAddress } = useWallet();
89
910
function showDonate() {
@@ -16,7 +17,7 @@ function showDonate() {
1617
<div
1718
class="flex flex-col gap-3 p-4 pt-0 mx-auto lg:min-w-200 xl:min-w-250 2xl:min-w-300"
1819
>
19-
<RouterLink v-for="item in tools()" :key="item.title" :to="item.path">
20+
<RouterLink v-for="item in tools" :key="item.title" :to="item.path">
2021
<Card class="bg-muted/50 hover:bg-accent">
2122
<div class="flex items-center px-6 gap-4">
2223
<component :is="item.icon" v-if="item.icon" class="text-vuet" />

‎src/router/index.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ const router = createRouter({
1616
linkActiveClass: "bg-accent",
1717
});
1818

19+
let wallet: ReturnType<typeof useWallet> | undefined;
20+
1921
router.beforeEach(async (to) => {
2022
const store = useAppStore();
21-
const { activeAddress } = useWallet();
23+
wallet ??= effectScope(true).run(() => useWallet())!;
24+
const { activeAddress } = wallet;
2225
// redirect to root if not connected
2326
if (!activeAddress.value && to.path != "/") {
2427
await store.getCache();

‎vite.config.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ export default defineConfig({
9797
"vite-plugin-node-polyfills/shims/global",
9898
"vite-plugin-node-polyfills/shims/process",
9999
],
100-
exclude: ["lute-connect"],
100+
exclude: ["@galaxypay/lute-connect"],
101101
},
102102
});

0 commit comments

Comments
 (0)