Skip to content

Commit

Permalink
chore: release v1.0.1 (#2)
Browse files Browse the repository at this point in the history
* bugfix: algod not ready

* bugfix: disappearing participation

* bump version

* readme: updates
  • Loading branch information
acfunk authored Oct 20, 2024
1 parent 84f2d54 commit caa8eb7
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion AvmWinNode.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion webui/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
32 changes: 18 additions & 14 deletions webui/src/components/Node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,11 @@
</template>
</v-card-text>
<Participation
v-if="
algodClient &&
nodeStatus === 'Running' &&
algodStatus?.['last-round'] > 100
"
v-if="algodClient && algodStatus?.['last-round'] > 100"
:port="nodeConfig.port"
:token="nodeConfig.token"
:algod-client="algodClient"
:node-status="nodeStatus"
/>
</v-card>
</v-container>
Expand Down Expand Up @@ -113,11 +110,13 @@ async function getCatchpoint() {
const nodeStatus = computed(() =>
algodStatus.value?.["catchup-time"]
? "Syncing"
: nodeConfig.value?.serviceStatus
: nodeConfig.value
? nodeConfig.value.serviceStatus
: "Unknown"
);
const algodClient = computed(() => {
if (!nodeConfig.value) return undefined;
if (!nodeConfig.value?.port) return undefined;
return new Algodv2(
nodeConfig.value.token,
"http://localhost",
Expand All @@ -127,7 +126,6 @@ const algodClient = computed(() => {
onBeforeMount(async () => {
await getStatus();
await checkCatchup();
});
let refreshing = false;
Expand All @@ -146,7 +144,9 @@ async function getStatus() {
const resp = await axios({ url });
nodeConfig.value = resp.data;
if (nodeConfig.value?.serviceStatus === "Running") {
algodStatus.value = await algodClient.value?.status().do();
if (algodClient.value) {
algodStatus.value = await algodClient.value?.status().do();
}
if (!refreshing) autoRefresh();
} else {
algodStatus.value = undefined;
Expand Down Expand Up @@ -187,25 +187,21 @@ 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();
}
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");
}
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");
Expand All @@ -214,7 +210,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");
Expand All @@ -233,6 +228,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();
Expand Down
2 changes: 2 additions & 0 deletions webui/src/components/Participation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:icon="mdiPlus"
variant="plain"
color="primary"
:disabled="nodeStatus !== 'Running'"
@click="generateDialog"
/>
</v-card-title>
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit caa8eb7

Please sign in to comment.