Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions src-tauri/capabilities/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,9 @@
"identifier": "shell:allow-execute",
"allow": [
{
"name": "chmod+x",
"name": "chmod-walletshield",
"cmd": "chmod",
"args": [
"+x",
{
"validator": "\\S+"
}
],
"args": ["+x", "walletshield"],
"sidecar": false
}
]
Expand All @@ -55,14 +50,7 @@
{
"name": "walletshield-listen",
"cmd": "walletshield",
"args": [
"-listen",
":7070",
"-config",
{
"validator": "\\S+"
}
],
"args": ["-listen", ":7070", "-config", "client.toml"],
"sidecar": false
}
]
Expand Down
14 changes: 9 additions & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,14 @@ function App() {
// prepare the walletshield binary for execution
////////////////////////////////////////////////////////////////////////
if (platform() === "linux" || platform() === "macos") {
const output = await Command.create("chmod+x", [
"+x",
fileWalletshield,
]).execute();
log.debug(`executing command: chmod +x walletshield`);
const output = await Command.create(
"chmod-walletshield",
["+x", "walletshield"],
{
cwd: dirNetwork,
},
).execute();
if (output.code !== 0) {
throw new Error(`Failed to chmod+x walletshield: ${output.stderr}`);
}
Expand All @@ -181,7 +185,7 @@ function App() {
setMsgType(() => "info");
setMsg(() => `Starting network client...`);
const cmd = "walletshield";
const args = ["-listen", ":7070", "-config", fileClientCfg];
const args = ["-listen", ":7070", "-config", "client.toml"];
const command = Command.create("walletshield-listen", args, {
cwd: dirNetwork,
env: {
Expand Down