-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from wrkzcoin/development
Tx PoW + Add a required unlock height on transactions
- Loading branch information
Showing
111 changed files
with
8,158 additions
and
6,851 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
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 |
---|---|---|
|
@@ -48,3 +48,5 @@ main.js.map | |
|
||
.idea | ||
npm-debug.log.* | ||
# Build | ||
build/* |
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
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,41 @@ | ||
// Copyright (C) 2019 ExtraHash | ||
// | ||
// Please see the included LICENSE file for more information. | ||
import { ipcMain, IpcMainEvent } from 'electron'; | ||
|
||
export default class MessageRelayer { | ||
mainWindow: BrowserWindow; | ||
|
||
backendWindow: BrowserWindow; | ||
|
||
constructor(mainWindow, backendWindow) { | ||
this.mainWindow = mainWindow; | ||
this.backendWindow = backendWindow; | ||
|
||
ipcMain.on( | ||
'fromBackend', | ||
(event: IpcMainEvent, messageType: string, data: any) => { | ||
const message = { messageType, data }; | ||
this.mainWindow.send('fromBackend', message); | ||
} | ||
); | ||
|
||
ipcMain.on( | ||
'fromFrontend', | ||
(event: IpcMainEvent, messageType: string, data: any) => { | ||
const message = { messageType, data }; | ||
this.backendWindow.send('fromFrontend', message); | ||
} | ||
); | ||
} | ||
|
||
sendToBackend(messageType: string, data: any) { | ||
const message = { messageType, data }; | ||
this.backendWindow.send('fromMain', message); | ||
} | ||
|
||
sendToFrontend(messageType: string, data: any) { | ||
const message = { messageType, data }; | ||
this.mainWindow.send('fromMain', message); | ||
} | ||
} |
Binary file not shown.
Oops, something went wrong.