From 99bc46c00a5f21545272a116606b57784add0f7e Mon Sep 17 00:00:00 2001 From: Andy Funk Date: Sun, 20 Oct 2024 08:20:13 -0600 Subject: [PATCH 01/11] bugfix: algod not ready --- webui/src/components/Node.vue | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/webui/src/components/Node.vue b/webui/src/components/Node.vue index 910a576..4c53cb7 100644 --- a/webui/src/components/Node.vue +++ b/webui/src/components/Node.vue @@ -117,7 +117,7 @@ const nodeStatus = computed(() => ); const algodClient = computed(() => { - if (!nodeConfig.value) return undefined; + if (!nodeConfig.value?.port) return undefined; return new Algodv2( nodeConfig.value.token, "http://localhost", @@ -127,7 +127,6 @@ const algodClient = computed(() => { onBeforeMount(async () => { await getStatus(); - await checkCatchup(); }); let refreshing = false; @@ -146,7 +145,9 @@ async function getStatus() { const resp = await axios({ url }); nodeConfig.value = resp.data; if (nodeConfig.value?.serviceStatus === "Running") { + if (algodClient.value) { algodStatus.value = await algodClient.value?.status().do(); + } if (!refreshing) autoRefresh(); } else { algodStatus.value = undefined; @@ -187,7 +188,6 @@ const catchupData = computed(() => { async function createService() { loading.value = true; await axios({ url, method: "post" }); - await delay(500); store.setSnackbar("Service Created. Starting...", "success", -1); await startService(); } @@ -195,9 +195,7 @@ async function createService() { async function startService() { loading.value = true; await axios({ url: url + "/start", method: "put" }); - await delay(2000); await getStatus(); - await checkCatchup(); loading.value = false; store.setSnackbar("Node Started", "success"); } @@ -205,7 +203,6 @@ async function startService() { async function stopService() { loading.value = true; await axios({ url: url + "/stop", method: "put" }); - await delay(500); await getStatus(); loading.value = false; store.setSnackbar("Node Stopped", "success"); @@ -214,7 +211,6 @@ async function stopService() { async function deleteService() { loading.value = true; await axios({ url, method: "delete" }); - await delay(500); await getStatus(); loading.value = false; store.setSnackbar("Service Removed", "success"); @@ -233,6 +229,15 @@ async function resetNode() { store.setSnackbar("Data Deleted", "success"); } +watch( + () => nodeStatus.value, + (val) => { + if (val === "Syncing") { + checkCatchup(); + } + } +); + async function checkCatchup() { if (algodStatus.value?.["catchup-time"]) { const catchpoint = await getCatchpoint(); From 59b117211922d6c7d76401e3d9df80eff5187863 Mon Sep 17 00:00:00 2001 From: Andy Funk Date: Sun, 20 Oct 2024 09:11:06 -0600 Subject: [PATCH 02/11] bugfix: disappearing participation --- webui/src/components/Node.vue | 11 +++++------ webui/src/components/Participation.vue | 2 ++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/webui/src/components/Node.vue b/webui/src/components/Node.vue index 4c53cb7..8099661 100644 --- a/webui/src/components/Node.vue +++ b/webui/src/components/Node.vue @@ -65,14 +65,11 @@ @@ -113,7 +110,9 @@ async function getCatchpoint() { const nodeStatus = computed(() => algodStatus.value?.["catchup-time"] ? "Syncing" - : nodeConfig.value?.serviceStatus + : nodeConfig.value + ? nodeConfig.value.serviceStatus + : "Unknown" ); const algodClient = computed(() => { diff --git a/webui/src/components/Participation.vue b/webui/src/components/Participation.vue index d623d5c..1220450 100644 --- a/webui/src/components/Participation.vue +++ b/webui/src/components/Participation.vue @@ -6,6 +6,7 @@ :icon="mdiPlus" variant="plain" color="primary" + :disabled="nodeStatus !== 'Running'" @click="generateDialog" /> @@ -131,6 +132,7 @@ const props = defineProps({ port: { type: Number, required: true }, token: { type: String, required: true }, algodClient: { type: Algodv2, required: true }, + nodeStatus: { type: String, required: true }, }); const store = useAppStore(); From ba126d583508db764eb1e6be05e568d266b36667 Mon Sep 17 00:00:00 2001 From: Andy Funk Date: Sun, 20 Oct 2024 09:46:25 -0600 Subject: [PATCH 03/11] bump version --- .github/workflows/go.yml | 2 +- AvmWinNode.iss | 2 +- webui/package.json | 2 +- webui/src/components/Node.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4354024..1d8b513 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -58,5 +58,5 @@ jobs: uses: ncipollo/release-action@v1 with: allowUpdates: true - tag: v1.0.0 + tag: v1.0.1 artifacts: "Output\\AvmWinNode_Setup.exe" diff --git a/AvmWinNode.iss b/AvmWinNode.iss index ff615a8..a0a3717 100644 --- a/AvmWinNode.iss +++ b/AvmWinNode.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "AvmWinNode" -#define MyAppVersion "1.0.0" +#define MyAppVersion "1.0.1" #define MyAppPublisher "Galaxy Pay, LLC" #define MyAppPublisherURL "https://galaxy-pay.com" #define MyPublishPath "publish" diff --git a/webui/package.json b/webui/package.json index 601c52f..ec7b227 100644 --- a/webui/package.json +++ b/webui/package.json @@ -1,6 +1,6 @@ { "name": "avm-win-node-webui", - "version": "1.0.0", + "version": "1.0.1", "scripts": { "dev": "vite", "build": "vue-tsc --noEmit && vite build", diff --git a/webui/src/components/Node.vue b/webui/src/components/Node.vue index 8099661..49e93ec 100644 --- a/webui/src/components/Node.vue +++ b/webui/src/components/Node.vue @@ -145,7 +145,7 @@ async function getStatus() { nodeConfig.value = resp.data; if (nodeConfig.value?.serviceStatus === "Running") { if (algodClient.value) { - algodStatus.value = await algodClient.value?.status().do(); + algodStatus.value = await algodClient.value?.status().do(); } if (!refreshing) autoRefresh(); } else { From 31ed39e471045ed5f79fcb4edba87f27c4c6e52b Mon Sep 17 00:00:00 2001 From: Andy Funk Date: Sun, 20 Oct 2024 09:56:46 -0600 Subject: [PATCH 04/11] readme: updates --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 2b0d6bf..973ae47 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,10 @@ The code is open-source so you can review it yourself or have a trusted friend d The installer does not include the node software. It is automatically downloaded the first time you open the app from [this open-source repo](https://github.com/GalaxyPay/algowin), which compiles the official Go code into Windows binaries. This separation allows the node software to be updated without needing to update this app. +### Updates + +When updating a previous installation, the installer will recommend to let it automatically close applications and restart them after install. You should allow it to do this. + ## Manage Node Menu Options ### Create Service From 8ae0025aec38538ce7f02a2ce872dad76eeef97d Mon Sep 17 00:00:00 2001 From: Andy Funk Date: Sun, 20 Oct 2024 16:07:11 -0600 Subject: [PATCH 05/11] bugfix: show balance --- webui/src/components/AppBar.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webui/src/components/AppBar.vue b/webui/src/components/AppBar.vue index 94b340c..f5c5718 100644 --- a/webui/src/components/AppBar.vue +++ b/webui/src/components/AppBar.vue @@ -203,10 +203,10 @@ watch( () => store.refresh, async () => { if (activeAccount.value) { - const account = await algodClient.value + const info = await algodClient.value .accountInformation(activeAccount.value.address) .do(); - account.value = modelsv2.Account.from_obj_for_encoding(account); + account.value = modelsv2.Account.from_obj_for_encoding(info); } else { account.value = undefined; } From c5023a7354794ef8f68df94729eb85b2ff35f0a2 Mon Sep 17 00:00:00 2001 From: Andy Funk Date: Mon, 21 Oct 2024 08:08:44 -0600 Subject: [PATCH 06/11] fix: typo/verbiage --- webui/src/components/Participation.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webui/src/components/Participation.vue b/webui/src/components/Participation.vue index 1220450..f6e0a43 100644 --- a/webui/src/components/Participation.vue +++ b/webui/src/components/Participation.vue @@ -326,7 +326,7 @@ async function registerKey(item: Participation) { stateProofKey: item.key.stateProofKey!, }); atc.addTransaction({ txn, signer: transactionSigner }); - await execAtc(atc, "Successfuly Registered Key"); + await execAtc(atc, "Participation Key Registered"); } catch (err: any) { console.error(err); store.setSnackbar(err.message, "error"); @@ -348,7 +348,7 @@ async function offline() { nonParticipation: false, }); atc.addTransaction({ txn, signer: transactionSigner }); - await execAtc(atc, "Successfuly Offline"); + await execAtc(atc, "Account Offline"); } catch (err: any) { console.error(err); store.setSnackbar(err.message, "error"); From 0e7added0ab8b1bd2a58e04b21560278f079b06b Mon Sep 17 00:00:00 2001 From: Andy Funk Date: Mon, 21 Oct 2024 08:23:03 -0600 Subject: [PATCH 07/11] feat: add kibisis --- webui/package.json | 3 -- webui/pnpm-lock.yaml | 82 +++++++++++++++++++++++++------------- webui/src/plugins/index.ts | 1 + 3 files changed, 55 insertions(+), 31 deletions(-) diff --git a/webui/package.json b/webui/package.json index ec7b227..b3fd951 100644 --- a/webui/package.json +++ b/webui/package.json @@ -7,13 +7,10 @@ "preview": "vite preview" }, "dependencies": { - "@blockshake/defly-connect": "^1.1.6", "@mdi/js": "^7.4.47", - "@perawallet/connect": "^1.3.5", "@txnlab/use-wallet-vue": "^3.8.0", "algosdk": "2.9.0", "axios": "^1.7.7", - "lute-connect": "^1.4.1", "roboto-fontface": "^0.10.0", "vite-plugin-node-polyfills": "^0.22.0", "vue": "^3.4.31", diff --git a/webui/pnpm-lock.yaml b/webui/pnpm-lock.yaml index 2272580..f1fc622 100644 --- a/webui/pnpm-lock.yaml +++ b/webui/pnpm-lock.yaml @@ -8,15 +8,9 @@ importers: .: dependencies: - '@blockshake/defly-connect': - specifier: ^1.1.6 - version: 1.1.6(algosdk@2.9.0) '@mdi/js': specifier: ^7.4.47 version: 7.4.47 - '@perawallet/connect': - specifier: ^1.3.5 - version: 1.3.5(algosdk@2.9.0) '@txnlab/use-wallet-vue': specifier: ^3.8.0 version: 3.8.0(@agoralabs-sh/avm-web-provider@1.7.0)(@blockshake/defly-connect@1.1.6(algosdk@2.9.0))(@perawallet/connect@1.3.5(algosdk@2.9.0))(algosdk@2.9.0)(lute-connect@1.4.1)(vue@3.5.11(typescript@5.6.3)) @@ -26,9 +20,6 @@ importers: axios: specifier: ^1.7.7 version: 1.7.7 - lute-connect: - specifier: ^1.4.1 - version: 1.4.1 roboto-fontface: specifier: ^0.10.0 version: 0.10.0 @@ -1503,6 +1494,7 @@ snapshots: transitivePeerDependencies: - bufferutil - utf-8-validate + optional: true '@esbuild/aix-ppc64@0.21.5': optional: true @@ -1573,7 +1565,8 @@ snapshots: '@esbuild/win32-x64@0.21.5': optional: true - '@evanhahn/lottie-web-light@5.8.1': {} + '@evanhahn/lottie-web-light@5.8.1': + optional: true '@jridgewell/sourcemap-codec@1.5.0': {} @@ -1603,6 +1596,7 @@ snapshots: transitivePeerDependencies: - bufferutil - utf-8-validate + optional: true '@rollup/plugin-inject@5.0.5(rollup@4.24.0)': dependencies: @@ -1797,7 +1791,7 @@ snapshots: '@vue/shared@3.5.11': {} - '@vuetify/loader-shared@2.0.3(vue@3.5.11(typescript@5.6.3))(vuetify@3.7.2(typescript@5.6.3)(vite-plugin-vuetify@2.0.4)(vue@3.5.11(typescript@5.6.3)))': + '@vuetify/loader-shared@2.0.3(vue@3.5.11(typescript@5.6.3))(vuetify@3.7.2)': dependencies: upath: 2.0.1 vue: 3.5.11(typescript@5.6.3) @@ -1810,6 +1804,7 @@ snapshots: '@walletconnect/window-getters': 1.0.0 '@walletconnect/window-metadata': 1.0.0 detect-browser: 5.2.0 + optional: true '@walletconnect/client@1.8.0': dependencies: @@ -1820,6 +1815,7 @@ snapshots: transitivePeerDependencies: - bufferutil - utf-8-validate + optional: true '@walletconnect/core@1.8.0': dependencies: @@ -1829,6 +1825,7 @@ snapshots: transitivePeerDependencies: - bufferutil - utf-8-validate + optional: true '@walletconnect/crypto@1.0.3': dependencies: @@ -1838,33 +1835,39 @@ snapshots: aes-js: 3.1.2 hash.js: 1.1.7 tslib: 1.14.1 + optional: true '@walletconnect/encoding@1.0.2': dependencies: is-typedarray: 1.0.0 tslib: 1.14.1 typedarray-to-buffer: 3.1.5 + optional: true '@walletconnect/environment@1.0.1': dependencies: tslib: 1.14.1 + optional: true '@walletconnect/iso-crypto@1.8.0': dependencies: '@walletconnect/crypto': 1.0.3 '@walletconnect/types': 1.8.0 '@walletconnect/utils': 1.8.0 + optional: true '@walletconnect/jsonrpc-types@1.0.4': dependencies: events: 3.3.0 keyvaluestorage-interface: 1.0.0 + optional: true '@walletconnect/jsonrpc-utils@1.0.8': dependencies: '@walletconnect/environment': 1.0.1 '@walletconnect/jsonrpc-types': 1.0.4 tslib: 1.14.1 + optional: true '@walletconnect/randombytes@1.0.3': dependencies: @@ -1872,8 +1875,10 @@ snapshots: '@walletconnect/environment': 1.0.1 randombytes: 2.1.0 tslib: 1.14.1 + optional: true - '@walletconnect/safe-json@1.0.0': {} + '@walletconnect/safe-json@1.0.0': + optional: true '@walletconnect/socket-transport@1.8.0': dependencies: @@ -1883,8 +1888,10 @@ snapshots: transitivePeerDependencies: - bufferutil - utf-8-validate + optional: true - '@walletconnect/types@1.8.0': {} + '@walletconnect/types@1.8.0': + optional: true '@walletconnect/utils@1.8.0': dependencies: @@ -1895,16 +1902,20 @@ snapshots: bn.js: 4.11.8 js-sha3: 0.8.0 query-string: 6.13.5 + optional: true - '@walletconnect/window-getters@1.0.0': {} + '@walletconnect/window-getters@1.0.0': + optional: true '@walletconnect/window-metadata@1.0.0': dependencies: '@walletconnect/window-getters': 1.0.0 + optional: true acorn@8.12.1: {} - aes-js@3.1.2: {} + aes-js@3.1.2: + optional: true algo-msgpack-with-bigint@2.1.1: {} @@ -1967,7 +1978,8 @@ snapshots: bn.js@5.2.1: {} - bowser@2.11.0: {} + bowser@2.11.0: + optional: true brace-expansion@2.0.1: dependencies: @@ -2127,7 +2139,8 @@ snapshots: dependencies: ms: 2.1.3 - decode-uri-component@0.2.2: {} + decode-uri-component@0.2.2: + optional: true define-data-property@1.1.4: dependencies: @@ -2148,7 +2161,8 @@ snapshots: inherits: 2.0.4 minimalistic-assert: 1.0.1 - detect-browser@5.2.0: {} + detect-browser@5.2.0: + optional: true diffie-hellman@5.0.3: dependencies: @@ -2358,7 +2372,8 @@ snapshots: dependencies: which-typed-array: 1.1.15 - is-typedarray@1.0.0: {} + is-typedarray@1.0.0: + optional: true isarray@1.0.0: {} @@ -2376,7 +2391,8 @@ snapshots: dependencies: bignumber.js: 9.1.2 - keyvaluestorage-interface@1.0.0: {} + keyvaluestorage-interface@1.0.0: + optional: true local-pkg@0.5.0: dependencies: @@ -2387,9 +2403,11 @@ snapshots: dependencies: p-locate: 5.0.0 - lottie-web@5.12.2: {} + lottie-web@5.12.2: + optional: true - lute-connect@1.4.1: {} + lute-connect@1.4.1: + optional: true magic-string@0.30.11: dependencies: @@ -2575,8 +2593,10 @@ snapshots: qr-code-styling@1.6.0-rc.1: dependencies: qrcode-generator: 1.4.4 + optional: true - qrcode-generator@1.4.4: {} + qrcode-generator@1.4.4: + optional: true qs@6.13.0: dependencies: @@ -2587,6 +2607,7 @@ snapshots: decode-uri-component: 0.2.2 split-on-first: 1.1.0 strict-uri-encode: 2.0.0 + optional: true querystring-es3@0.2.1: {} @@ -2702,7 +2723,8 @@ snapshots: source-map-js@1.2.1: {} - split-on-first@1.1.0: {} + split-on-first@1.1.0: + optional: true stream-browserify@3.0.0: dependencies: @@ -2716,7 +2738,8 @@ snapshots: readable-stream: 3.6.2 xtend: 4.0.2 - strict-uri-encode@2.0.0: {} + strict-uri-encode@2.0.0: + optional: true string_decoder@1.1.1: dependencies: @@ -2742,7 +2765,8 @@ snapshots: dependencies: is-number: 7.0.0 - tslib@1.14.1: {} + tslib@1.14.1: + optional: true tty-browserify@0.0.1: {} @@ -2751,6 +2775,7 @@ snapshots: typedarray-to-buffer@3.1.5: dependencies: is-typedarray: 1.0.0 + optional: true typescript@5.6.3: {} @@ -2846,7 +2871,7 @@ snapshots: vite-plugin-vuetify@2.0.4(vite@5.4.8(@types/node@20.16.11)(sass@1.77.6))(vue@3.5.11(typescript@5.6.3))(vuetify@3.7.2): dependencies: - '@vuetify/loader-shared': 2.0.3(vue@3.5.11(typescript@5.6.3))(vuetify@3.7.2(typescript@5.6.3)(vite-plugin-vuetify@2.0.4)(vue@3.5.11(typescript@5.6.3))) + '@vuetify/loader-shared': 2.0.3(vue@3.5.11(typescript@5.6.3))(vuetify@3.7.2) debug: 4.3.7 upath: 2.0.1 vite: 5.4.8(@types/node@20.16.11)(sass@1.77.6) @@ -2909,7 +2934,8 @@ snapshots: gopd: 1.0.1 has-tostringtag: 1.0.2 - ws@7.5.3: {} + ws@7.5.3: + optional: true xtend@4.0.2: {} diff --git a/webui/src/plugins/index.ts b/webui/src/plugins/index.ts index 58b3cf4..c1ae70d 100644 --- a/webui/src/plugins/index.ts +++ b/webui/src/plugins/index.ts @@ -28,6 +28,7 @@ export function registerPlugins(app: App) { }, WalletId.DEFLY, WalletId.PERA, + WalletId.KIBISIS, ], network: NetworkId.MAINNET, }); From ac6951cc004dd970fb051f22ffe8d20d980adb04 Mon Sep 17 00:00:00 2001 From: Andy Funk Date: Mon, 21 Oct 2024 09:36:42 -0600 Subject: [PATCH 08/11] launch browser postinstall --- AvmWinNode.iss | 1 + LocalPublish.ps1 | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 LocalPublish.ps1 diff --git a/AvmWinNode.iss b/AvmWinNode.iss index a0a3717..6846d1b 100644 --- a/AvmWinNode.iss +++ b/AvmWinNode.iss @@ -45,6 +45,7 @@ Name: "{commondesktop}\AvmWinNode"; Filename: "http://localhost:3536/"; IconFile Filename: "sc.exe"; Parameters: "create ""AvmWinNode"" binPath= ""{app}\AvmWinNode.exe"" start= auto" Filename: "sc.exe"; Parameters: "start ""AvmWinNode""" Filename: "cmd.exe"; Parameters: "/c mkdir {commonappdata}\AvmWinNode" +Filename: "http://localhost:3536/"; Flags: shellexec postinstall; Description: "Launch AvmWinNode" [UninstallRun] Filename: "sc.exe"; Parameters: "stop ""AvmWinNode"""; RunOnceId: "StopService" diff --git a/LocalPublish.ps1 b/LocalPublish.ps1 new file mode 100644 index 0000000..1e8de70 --- /dev/null +++ b/LocalPublish.ps1 @@ -0,0 +1,18 @@ +Remove-Item Output -Force -Recurse -ErrorAction Ignore +Remove-Item publish -Force -Recurse -ErrorAction Ignore + +Set-Location AvmWinNode +dotnet publish -o ..\publish + +Set-Location ..\AlgorandService +dotnet publish -o ..\publish\Services -p:PublishSingleFile=true + +Set-Location ..\VoiService +dotnet publish -o ..\publish\Services -p:PublishSingleFile=true + +Set-Location ..\webui +pnpm install +pnpm build + +Set-Location .. +iscc AvmWinNode.iss \ No newline at end of file From b1b0abb7867a9dd9adc570e1338ce00e192bb2d0 Mon Sep 17 00:00:00 2001 From: Andy Funk Date: Mon, 21 Oct 2024 09:53:48 -0600 Subject: [PATCH 09/11] copy part key to clipboard --- webui/src/App.vue | 3 +++ webui/src/components/Participation.vue | 35 ++++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/webui/src/App.vue b/webui/src/App.vue index 3df7270..3f5d489 100644 --- a/webui/src/App.vue +++ b/webui/src/App.vue @@ -22,4 +22,7 @@ const store = useAppStore(); .no-select { user-select: none; } +.pointer { + cursor: pointer; +} diff --git a/webui/src/components/Participation.vue b/webui/src/components/Participation.vue index f6e0a43..8c789f5 100644 --- a/webui/src/components/Participation.vue +++ b/webui/src/components/Participation.vue @@ -31,7 +31,7 @@ />