Skip to content

Commit 07d73d0

Browse files
authored
Merge pull request #56 from GalaxyPay/dev
2 parents 68146a7 + 5d3ad53 commit 07d73d0

File tree

11 files changed

+33
-38
lines changed

11 files changed

+33
-38
lines changed

.github/workflows/go.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,5 +266,5 @@ jobs:
266266
uses: ncipollo/release-action@v1
267267
with:
268268
allowUpdates: true
269-
tag: v3.2.2
269+
tag: v3.2.3
270270
artifacts: "Output/*"

FUNC.iss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "FUNC"
5-
#define MyAppVersion "3.2.2"
5+
#define MyAppVersion "3.2.3"
66
#define MyAppPublisher "Galaxy Pay, LLC"
77
#define MyAppPublisherURL "https://galaxy-pay.com"
88
#define MyPublishPath "publish"

FUNC/Controllers/GoalController.cs

+26-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public async Task<ActionResult<GoalVersion>> GoalVersion()
2323
string installed = string.Empty;
2424
string latest = string.Empty;
2525

26-
string goalPath = Path.Combine(Utils.appDataDir, "bin", "goal");
27-
string version = await Utils.ExecCmd($"{goalPath} --version");
26+
string algodPath = Path.Combine(Utils.appDataDir, "bin", "algod");
27+
string version = await Utils.ExecCmd($"{algodPath} -v");
2828
if (version != string.Empty)
2929
{
3030
int firstBreak = version.IndexOf("\n") + 1;
@@ -128,11 +128,35 @@ public async Task<ActionResult<string>> GoalUpdate(Models.Release model)
128128
await s.CopyToAsync(fs);
129129
fs.Dispose();
130130

131+
// Get Node Statuses
132+
var algorandStatus = await Node.Get("algorand");
133+
var voiStatus = await Node.Get("voi");
134+
135+
// Stop Running Nodes
136+
if (algorandStatus.ServiceStatus == "Running")
137+
{
138+
await Node.ControlService("algorand", "stop");
139+
}
140+
if (voiStatus.ServiceStatus == "Running")
141+
{
142+
await Node.ControlService("voi", "stop");
143+
}
144+
131145
using FileStream rfs = new(filePath, System.IO.FileMode.Open, FileAccess.Read);
132146
using GZipStream gz = new(rfs, CompressionMode.Decompress, leaveOpen: true);
133147
await TarFile.ExtractToDirectoryAsync(gz, Utils.appDataDir, true);
134148
rfs.Dispose();
135149

150+
// Restart Running Nodes
151+
if (algorandStatus.ServiceStatus == "Running")
152+
{
153+
await Node.ControlService("algorand", "start");
154+
}
155+
if (voiStatus.ServiceStatus == "Running")
156+
{
157+
await Node.ControlService("voi", "start");
158+
}
159+
136160
System.IO.File.Delete(filePath);
137161

138162
return Ok();

create-package-deb.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
rm -r Output
22

3-
PKG=Output/func_3.2.2_linux-$1
3+
PKG=Output/func_3.2.3_linux-$1
44

55
mkdir -p $PKG/lib/systemd/system
66
mkdir -p $PKG/opt/func

create-package-pkg.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ pkgbuild --root publish \
55
--install-location /opt/func \
66
--scripts pkg/scripts \
77
--identifier func.app \
8-
Output/func_3.2.2_darwin-$1.pkg
8+
Output/func_3.2.3_darwin-$1.pkg

deb/amd64/control

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: func
2-
Version: 3.2.2
2+
Version: 3.2.3
33
Section: base
44
Priority: optional
55
Architecture: amd64

deb/arm64/control

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: func
2-
Version: 3.2.2
2+
Version: 3.2.3
33
Section: base
44
Priority: optional
55
Architecture: arm64

webui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "func-webui",
3-
"version": "3.2.2",
3+
"version": "3.2.3",
44
"scripts": {
55
"dev": "vite",
66
"build": "vite build",

webui/src/components/Node.vue

-26
Original file line numberDiff line numberDiff line change
@@ -487,30 +487,4 @@ function reloadPartDetails() {
487487
partDetails.value = undefined;
488488
store.refresh++;
489489
}
490-
491-
let paused = false;
492-
493-
watch(
494-
() => store.stopNodeServices,
495-
async (val) => {
496-
try {
497-
if (val && nodeStatus.value?.serviceStatus === "Running") {
498-
paused = true;
499-
await FUNC.api.put(`${props.name}/stop`);
500-
nodeStatus.value.serviceStatus = "Stopped";
501-
algodStatus.value = undefined;
502-
peers.value = undefined;
503-
}
504-
if (!val && paused) {
505-
paused = false;
506-
await FUNC.api.put(`${props.name}/start`);
507-
await delay(500);
508-
getNodeStatus();
509-
}
510-
} catch (err: any) {
511-
console.error(err);
512-
store.setSnackbar(err?.response?.data || err.message, "error");
513-
}
514-
}
515-
);
516490
</script>

webui/src/components/Settings.vue

-2
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,12 @@ async function updateNodeLatest(bypass = false) {
147147
async function updateNode(release: string) {
148148
try {
149149
store.downloading = true;
150-
store.stopNodeServices = true;
151150
await FUNC.api.post("goal/update", { name: release });
152151
await getVersion();
153152
} catch (err: any) {
154153
console.error(err);
155154
store.setSnackbar(err?.response?.data || err.message, "error");
156155
}
157-
store.stopNodeServices = false;
158156
store.downloading = false;
159157
}
160158

webui/src/stores/app.ts

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export const useAppStore = defineStore("app", {
1414
} as SnackBar,
1515
refresh: 0,
1616
connectMenu: false,
17-
stopNodeServices: false,
1817
funcUpdateAvailable: false,
1918
nodeUpdateAvailable: false,
2019
downloading: false,

0 commit comments

Comments
 (0)