Merge pull request #371 from BeaudanBrown/testnet

Separate testnet
pull/382/head
Beaudan Campbell-Brown 6 years ago committed by GitHub
commit 73b417e605
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,10 +20,12 @@ if (environment === 'production') {
process.env.NODE_CONFIG = '';
process.env.NODE_CONFIG_STRICT_MODE = true;
process.env.HOSTNAME = '';
process.env.NODE_APP_INSTANCE = '';
process.env.ALLOW_CONFIG_MUTATIONS = '';
process.env.SUPPRESS_NO_CONFIG_WARNING = '';
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '';
if (!process.env.LOKI_DEV) {
process.env.NODE_APP_INSTANCE = '';
}
}
// We load config after we've made our modifications to NODE_ENV

@ -7,15 +7,7 @@
"defaultPoWDifficulty": "100",
"seedNodeList": [
{
"ip": "3.104.19.14",
"port": "22023"
},
{
"ip": "13.238.53.205",
"port": "38157"
},
{
"ip": "imaginary.stream",
"ip": "storage.testnetseed1.loki.network",
"port": "38157"
}
],

@ -1 +1,16 @@
{}
{
"seedNodeList": [
{
"ip": "storage.seed1.loki.network",
"port": "22023"
},
{
"ip": "storage.seed2.loki.network",
"port": "38157"
},
{
"ip": "imaginary.stream",
"port": "38157"
}
]
}

@ -96,7 +96,7 @@ class LokiMessageAPI {
const timestamp = Date.now();
const nonce = await calcNonce(
messageEventData,
pubKey,
window.getStoragePubKey(pubKey),
data64,
timestamp,
ttl

@ -1,4 +1,4 @@
/* global log, libloki, textsecure */
/* global log, libloki, textsecure, getStoragePubKey */
const nodeFetch = require('node-fetch');
const { parse } = require('url');
@ -119,6 +119,14 @@ const rpc = (
const portString = port ? `:${port}` : '';
const url = `${address}${portString}${endpoint}`;
// TODO: The jsonrpc and body field will be ignored on storage server
if (params.pubKey) {
// Ensure we always take a copy
// eslint-disable-next-line no-param-reassign
params = {
...params,
pubKey: getStoragePubKey(params.pubKey),
};
}
const body = {
jsonrpc: '2.0',
id: '0',

@ -14,6 +14,8 @@
"postinstall": "electron-builder install-app-deps && rimraf node_modules/dtrace-provider",
"start": "electron .",
"start-multi": "NODE_APP_INSTANCE=1 electron .",
"start-prod": "LOKI_DEV=1 electron .",
"start-prod-multi": "LOKI_DEV=1 NODE_APP_INSTANCE=1 electron .",
"grunt": "grunt",
"icon-gen": "electron-icon-maker --input=images/icon_1024.png --output=./build",
"generate": "yarn icon-gen && yarn grunt",

@ -26,6 +26,7 @@ window.platform = process.platform;
window.getDefaultPoWDifficulty = () => config.defaultPoWDifficulty;
window.getTitle = () => title;
window.getEnvironment = () => config.environment;
window.isDev = () => config.environment === 'development';
window.getAppInstance = () => config.appInstance;
window.getVersion = () => config.version;
window.isImportMode = () => config.importMode;
@ -36,6 +37,8 @@ window.getHostName = () => config.hostname;
window.getServerTrustRoot = () => config.serverTrustRoot;
window.isBehindProxy = () => Boolean(config.proxyUrl);
window.JobQueue = JobQueue;
window.getStoragePubKey = key =>
window.isDev() ? key.substring(0, key.length - 2) : key;
window.isBeforeVersion = (toCheck, baseVersion) => {
try {

Loading…
Cancel
Save