-
Notifications
You must be signed in to change notification settings - Fork 6
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 #6 from SmartCash/develop
Develop
- Loading branch information
Showing
18 changed files
with
4,704 additions
and
3,678 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIC5TCCAc2gAwIBAgIJAIl6U0vHSpaQMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV | ||
BAMMCWxvY2FsaG9zdDAeFw0xOTEyMjQwOTA0MDZaFw0yMDAxMjMwOTA0MDZaMBQx | ||
EjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC | ||
ggEBAN4HtjsmCTYqpJdFnQsszEzbpyDRph55WGbIlAPz2RJ1U9S7ag/APkSEHw+i | ||
ufzYad+QlXruD0H6d8t9+Wt7gZBGH7ZpAwFRQ5InA36kGVGWWUsnVbSmNhW5OQY3 | ||
66IzK5zakGKSTe+1/JcuHvBSrqN1l2775kqs1sRaq+rUCCOD++OISJIYlb3vCoKP | ||
tRqWme16VxGPRTasHeYriJUna/p3kYLpcS3kYC97nzebui3P0EsSX5jZ2a1zWmq2 | ||
ZwiBW4eTPsJSF852Xn69JJ7FDmPof8VXUwAzUKoC3ywTg1kvNBihFZWySzLn3LzO | ||
LiagHe7/Ep3jTGtd6gyqvHOFWRsCAwEAAaM6MDgwFAYDVR0RBA0wC4IJbG9jYWxo | ||
b3N0MAsGA1UdDwQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDATANBgkqhkiG9w0B | ||
AQsFAAOCAQEAU71535ripYYarG0Gv000ZziHRo3LHQj3kY3XbNH5ihEghQ0bO2uE | ||
uo8v4O5gN8cZc8r6X7Z01AeolK1MC0Cd+fjd0IHc8ZcT9dEnl7phqxCpHS+KzE9F | ||
AIIDmyBaJb4jgfghiY8cWzjlBxilMeOrs2qKCpjbc3xdlgx3bvhvlsndUHpOSnP3 | ||
qc+uBNFjkVvvANW34YMVvVplCiq0Sys6dAd0sfDH/mIqO0TDgYl32Mp0uJ3znwUO | ||
ZYDRRpGw/3V+OCs0BWn/EGCDOXLR6U7zeeqGc+p9NwUYvEYaQdvqhLRD0BUP4AXQ | ||
J3jUnj60n64J2xYFYMRQMyDe4KArfLxSrA== | ||
-----END CERTIFICATE----- |
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,28 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDeB7Y7Jgk2KqSX | ||
RZ0LLMxM26cg0aYeeVhmyJQD89kSdVPUu2oPwD5EhB8Porn82GnfkJV67g9B+nfL | ||
fflre4GQRh+2aQMBUUOSJwN+pBlRlllLJ1W0pjYVuTkGN+uiMyuc2pBikk3vtfyX | ||
Lh7wUq6jdZdu++ZKrNbEWqvq1Agjg/vjiEiSGJW97wqCj7UalpntelcRj0U2rB3m | ||
K4iVJ2v6d5GC6XEt5GAve583m7otz9BLEl+Y2dmtc1pqtmcIgVuHkz7CUhfOdl5+ | ||
vSSexQ5j6H/FV1MAM1CqAt8sE4NZLzQYoRWVsksy59y8zi4moB3u/xKd40xrXeoM | ||
qrxzhVkbAgMBAAECggEBAK71jsD/UQTxB2/4uC7FJ1xtPj6bVfbvkhy0dAbFUcm8 | ||
0MlywboVuDuPjVZp2XuIIa29Jj2PeFB6iYm+BByRX2CMEZNRHsAcBE4YFiXmM9l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
rdZjCxD5IJ22LTvl5WvC2aOXrydJbi+MW7+/b6io719njrkNP+XqYCnKNhdUDVVJ | ||
X7wVz0wCBIp4OZo97PNM2ILW5w== | ||
-----END PRIVATE KEY----- |
Large diffs are not rendered by default.
Oops, something went wrong.
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,34 @@ | ||
const electron = require("electron"); | ||
const app = electron.app; | ||
const BrowserWindow = electron.BrowserWindow; | ||
const path = require("path"); | ||
const isDev = require("electron-is-dev"); | ||
let mainWindow; | ||
function createWindow() { | ||
mainWindow = new BrowserWindow({ | ||
width: 1200, | ||
height: 800, | ||
icon: "" | ||
}); | ||
|
||
|
||
mainWindow.loadURL( | ||
isDev | ||
? "http://localhost:3000" | ||
: `file://${path.join(__dirname, "../build/index.html")}` | ||
); | ||
mainWindow.on("closed", () => (mainWindow = null)); | ||
} | ||
|
||
app.on("ready", createWindow); | ||
app.on("window-all-closed", () => { | ||
if (process.platform !== "darwin") { | ||
app.quit(); | ||
} | ||
}); | ||
|
||
app.on("activate", () => { | ||
if (mainWindow === null) { | ||
createWindow(); | ||
} | ||
}); |
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,25 @@ | ||
const isLocalHost = hostname => !!( | ||
hostname === 'localhost' || | ||
hostname === '[::1]' || | ||
hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/) | ||
); | ||
|
||
const HttpsRedirect = ({ disabled, children }) => { | ||
if ( | ||
!disabled && | ||
typeof window !== 'undefined' && | ||
window.location && | ||
window.location.protocol === 'http:' && | ||
!isLocalHost(window.location.hostname) | ||
) { | ||
window.location.href = window.location.href.replace( | ||
/^http(?!s)/, | ||
'https' | ||
); | ||
return null; | ||
} | ||
|
||
return children; | ||
}; | ||
|
||
export default HttpsRedirect; |
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,11 @@ | ||
const SATOSHI = 10000000; | ||
const toSatoshi = (amount) => (amount * SATOSHI); | ||
const fromSatoshi = (amount) => (amount / SATOSHI); | ||
|
||
export const sumtractFloats = (amount1, amount2) => { | ||
return fromSatoshi(toSatoshi(amount1) + toSatoshi(amount2)); | ||
}; | ||
|
||
export const subtractFloats = (amount1, amount2) => { | ||
return fromSatoshi(toSatoshi(amount1) - toSatoshi(amount2)); | ||
}; |
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.