-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'devnet' of https://github.com/gbayasgalan/ethereum-node …
…into pr/2014
- Loading branch information
Showing
333 changed files
with
1,606 additions
and
4,435 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Code Quality Check | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
prettier: | ||
name: Prettier | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
- run: npm install | ||
working-directory: ./launcher | ||
- run: npm run format:check | ||
working-directory: ./launcher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
**/.git | ||
**/.svn | ||
**/.hg | ||
**/node_modules | ||
**/coverage | ||
**/dist | ||
**/dist_electron | ||
package-lock.json | ||
public/output.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
"semi": true, | ||
"singleQuote": false, | ||
"tabWidth": 2, | ||
"printWidth": 120, | ||
"printWidth": 140, | ||
"useTabs": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
// custom sign script calling digicerts keytool from out of the electron-builder | ||
exports.default = async function(configuration) { | ||
|
||
if(configuration.path){ | ||
|
||
require("child_process").execSync( | ||
`smctl sign --keypair-alias=${process.env.KEYPAIR_ALIAS} --input "${String(configuration.path)}"` | ||
); | ||
|
||
} | ||
}; | ||
exports.default = async function (configuration) { | ||
if (configuration.path) { | ||
require("child_process").execSync(`smctl sign --keypair-alias=${process.env.KEYPAIR_ALIAS} --input "${String(configuration.path)}"`); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,84 @@ | ||
import { autoUpdater } from "electron-updater"; | ||
import { app, BrowserWindow } from "electron"; | ||
|
||
|
||
export class StereumUpdater { | ||
constructor(logger, createWindow) { | ||
this.updater = autoUpdater | ||
this.updateWindow = null | ||
this.logger = logger | ||
this.createWindow = createWindow | ||
} | ||
constructor(logger, createWindow) { | ||
this.updater = autoUpdater; | ||
this.updateWindow = null; | ||
this.logger = logger; | ||
this.createWindow = createWindow; | ||
} | ||
|
||
checkForUpdates() { | ||
app.showExitPrompt = true; | ||
this.updater.checkForUpdates() | ||
} | ||
checkForUpdates() { | ||
app.showExitPrompt = true; | ||
this.updater.checkForUpdates(); | ||
} | ||
|
||
initUpdater() { | ||
this.updater.logger = this.logger; | ||
this.updater.logger.transports.file.level = "debug"; | ||
initUpdater() { | ||
this.updater.logger = this.logger; | ||
this.updater.logger.transports.file.level = "debug"; | ||
|
||
this.updater.on("checking-for-update", () => { | ||
this.logger.info("Stereum is checking for updates."); | ||
}); | ||
this.updater.on("checking-for-update", () => { | ||
this.logger.info("Stereum is checking for updates."); | ||
}); | ||
|
||
this.updater.on("update-available", async () => { | ||
this.updateWindow = await this.createWindow("update") | ||
if (this.updateWindow) | ||
this.updateWindow.webContents.send('UpdateEvents', { message: "Update available.", type: "available" }) | ||
this.logger.info("Update available."); | ||
}); | ||
this.updater.on("update-available", async () => { | ||
this.updateWindow = await this.createWindow("update"); | ||
if (this.updateWindow) this.updateWindow.webContents.send("UpdateEvents", { message: "Update available.", type: "available" }); | ||
this.logger.info("Update available."); | ||
}); | ||
|
||
this.updater.on("update-not-available", () => { | ||
app.showExitPrompt = false; | ||
this.createWindow(); | ||
this.logger.info("No updates available. Stereum is Up-to-date."); | ||
}); | ||
this.updater.on("update-not-available", () => { | ||
app.showExitPrompt = false; | ||
this.createWindow(); | ||
this.logger.info("No updates available. Stereum is Up-to-date."); | ||
}); | ||
|
||
this.updater.on("download-progress", (data) => { | ||
if (this.updateWindow) | ||
this.updateWindow.webContents.send('UpdateEvents', { message: "Downloading update...", type: "downloading", data: { percent: data.percent, MBps: data.bytesPerSecond / 1000000 } }) | ||
this.logger.info("Update progress", data); | ||
this.updater.on("download-progress", (data) => { | ||
if (this.updateWindow) | ||
this.updateWindow.webContents.send("UpdateEvents", { | ||
message: "Downloading update...", | ||
type: "downloading", | ||
data: { percent: data.percent, MBps: data.bytesPerSecond / 1000000 }, | ||
}); | ||
this.logger.info("Update progress", data); | ||
}); | ||
|
||
this.updater.on("update-downloaded", async (data) => { | ||
app.showExitPrompt = false | ||
if (this.updateWindow) | ||
this.updateWindow.webContents.send('UpdateEvents', { message: "Update downloaded. " + data.version, type: "downloaded" }) | ||
this.updater.quitAndInstall() | ||
this.logger.info("Update downloaded.", data); | ||
}); | ||
this.updater.on("update-downloaded", async (data) => { | ||
app.showExitPrompt = false; | ||
if (this.updateWindow) | ||
this.updateWindow.webContents.send("UpdateEvents", { message: "Update downloaded. " + data.version, type: "downloaded" }); | ||
this.updater.quitAndInstall(); | ||
this.logger.info("Update downloaded.", data); | ||
}); | ||
|
||
this.updater.on("error", async (error) => { | ||
app.showExitPrompt = false; | ||
const allWindows = await BrowserWindow.getAllWindows(); | ||
for (const win of allWindows) { | ||
await win.close() | ||
} | ||
this.createWindow(); | ||
this.logger.error("Error: ", error) | ||
}); | ||
} | ||
this.updater.on("error", async (error) => { | ||
app.showExitPrompt = false; | ||
const allWindows = await BrowserWindow.getAllWindows(); | ||
for (const win of allWindows) { | ||
await win.close(); | ||
} | ||
this.createWindow(); | ||
this.logger.error("Error: ", error); | ||
}); | ||
} | ||
|
||
async runDebug() { | ||
async function Sleep(ms) { | ||
return new Promise((resolve) => setTimeout(resolve, ms)); | ||
} | ||
this.updateWindow = await this.createWindow("update"); | ||
await Sleep(5000) | ||
for (let i = 0; i < 10; i++) { | ||
this.updateWindow.webContents.send('UpdateEvents', { message: "Downloading update...", type: "downloading", data: { percent: i * 10, MBps: i * 10.11 } }) | ||
await Sleep(1000) | ||
} | ||
this.updateWindow.webContents.send('UpdateEvents', { message: "Update downloaded. " + "2.0.0-rc.20", type: "downloaded" }) | ||
await Sleep(1000) | ||
this.updateWindow.close() | ||
async runDebug() { | ||
async function Sleep(ms) { | ||
return new Promise((resolve) => setTimeout(resolve, ms)); | ||
} | ||
this.updateWindow = await this.createWindow("update"); | ||
await Sleep(5000); | ||
for (let i = 0; i < 10; i++) { | ||
this.updateWindow.webContents.send("UpdateEvents", { | ||
message: "Downloading update...", | ||
type: "downloading", | ||
data: { percent: i * 10, MBps: i * 10.11 }, | ||
}); | ||
await Sleep(1000); | ||
} | ||
} | ||
this.updateWindow.webContents.send("UpdateEvents", { message: "Update downloaded. " + "2.0.0-rc.20", type: "downloaded" }); | ||
await Sleep(1000); | ||
this.updateWindow.close(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.