Skip to content

Commit

Permalink
Merge pull request #1136 from chronologic/update-bintray
Browse files Browse the repository at this point in the history
Maintenance updates
  • Loading branch information
ma12ki authored Jul 22, 2020
2 parents d4ea375 + 9e101e6 commit 0279c64
Show file tree
Hide file tree
Showing 11 changed files with 707 additions and 419 deletions.
1 change: 1 addition & 0 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
MIXPANEL_TOKEN="1062540872eddc17fb1983bfb8d5e91c"
MIXPANEL_QUERY_TOKEN="d9bbd724f75035b7ab1d27769bc74362"
NOMICS_API_KEY="c13b3d7a7c837cab121a749c7824b162"
ETHERSCAN_API_KEY="WBH3GKDVBJRKD9QNY171TVTIQ7YNP14D7G"
CRYPTO_KITTIES_API_KEY="jM7HYCDKABweBJlWNE29QSkDyD4-HK4ypx__2Qw7xzg"
3 changes: 2 additions & 1 deletion .env.prod
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
MIXPANEL_TOKEN="1062540872eddc17fb1983bfb8d5e91c"
MIXPANEL_QUERY_TOKEN="d9bbd724f75035b7ab1d27769bc74362"
NOMICS_API_KEY="c13b3d7a7c837cab121a749c7824b162"
NOMICS_API_KEY="8e063970d0e83bedaec1d968f4ff82fd"
ETHERSCAN_API_KEY="WBH3GKDVBJRKD9QNY171TVTIQ7YNP14D7G"
CRYPTO_KITTIES_API_KEY="jM7HYCDKABweBJlWNE29QSkDyD4-HK4ypx__2Qw7xzg"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ yarn-error.log
electron-builds
yarn.lock
TimeNode.app/
dappnode/build_*
dappnode/build_*
signed-msg.txt
wallet.txt
5 changes: 4 additions & 1 deletion app/components/TimeNode/Network/ActiveTimeNodesGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ class ActiveTimeNodesGraph extends Component {

labels.push(datetime.format('H:00'));

values.push(data.filter(item => item.key[0] == datetime.toISOString()).length);
values.push(
data.filter(item => item.key[0] == datetime.toISOString()).length +
1 /* chronologic CLI timenode */
);
}

return {
Expand Down
26 changes: 24 additions & 2 deletions app/config/web3Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,27 @@ export const PROVIDER_URLS = {
MAINNET: {
QUIKNODE: {
ws:
'wss://smoothly-included-cattle.quiknode.io/4541de38-7057-4f36-9b63-08dac0e0098e/3fjrTlXVDWwLRmrbP0KbAQ==/',
// 'wss://smoothly-included-cattle.quiknode.io/4541de38-7057-4f36-9b63-08dac0e0098e/3fjrTlXVDWwLRmrbP0KbAQ==/',
// 'wss://mainnet.infura.io/ws/v3/22ac4c94510047f8bfc8cddf18055a3e',
randomArrayElement([
'wss://mainnet.infura.io/ws/v3/03782d1e57754461bb6fd774240a07c2',
'wss://mainnet.infura.io/ws/v3/890f3b0506e440ccb7493bb5f3ef5abc',
'wss://mainnet.infura.io/ws/v3/06a8f1e75e3b49f887b00adc114fff57',
'wss://mainnet.infura.io/ws/v3/56117f2bbe0b461f8e2690812944142c',
'wss://mainnet.infura.io/ws/v3/1309d15392394944b26b0328edf3e8eb',
'wss://mainnet.infura.io/ws/v3/09a8bfac7234446891b322c8e6c55898'
]),
http:
'https://smoothly-included-cattle.quiknode.io/4541de38-7057-4f36-9b63-08dac0e0098e/3fjrTlXVDWwLRmrbP0KbAQ==/'
// 'https://smoothly-included-cattle.quiknode.io/4541de38-7057-4f36-9b63-08dac0e0098e/3fjrTlXVDWwLRmrbP0KbAQ==/'
// 'https://mainnet.infura.io/v3/22ac4c94510047f8bfc8cddf18055a3e'
randomArrayElement([
'https://mainnet.infura.io/v3/03782d1e57754461bb6fd774240a07c2',
'https://mainnet.infura.io/v3/890f3b0506e440ccb7493bb5f3ef5abc',
'https://mainnet.infura.io/v3/06a8f1e75e3b49f887b00adc114fff57',
'https://mainnet.infura.io/v3/56117f2bbe0b461f8e2690812944142c',
'https://mainnet.infura.io/v3/1309d15392394944b26b0328edf3e8eb',
'https://mainnet.infura.io/v3/09a8bfac7234446891b322c8e6c55898'
])
},
DAPPNODE: {
ws: 'ws://my.ethchain.dnp.dappnode.eth:8546',
Expand All @@ -33,6 +51,10 @@ export const PROVIDER_URLS = {
}
};

function randomArrayElement(array) {
return array[Math.floor(Math.random() * array.length)];
}

const Networks = {
0: {
id: 0,
Expand Down
2 changes: 1 addition & 1 deletion app/stores/AnalyticsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class AnalyticsStore {
this.isBlacklisted = true;
}

return response.length;
return response.length + 1 /* chronologic CLI timenode */;
}
}

Expand Down
18 changes: 13 additions & 5 deletions app/stores/EacStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,22 @@ export default class EacStore {

this.contracts = await this._eac.getActiveContracts();

const eacCounter = new EacCounter();
const eacCounter = new EacCounter({
nomicsApiKey: process.env.NOMICS_API_KEY,
etherscanApiKey: process.env.ETHERSCAN_API_KEY
});

await eacCounter.enableUSDFetching(process.env.NOMICS_API_KEY);
await eacCounter.enableUSDFetching();

const { eth, usd } = await eacCounter.getTotalTransferred();
try {
const { eth, usd } = await eacCounter.getTotalTransferred();

this.totalEthTransferred = Math.round(eth);
this.totalUsdTransferred = usd ? Math.round(usd) : null;
console.log('TOTAL', { eth, usd });
this.totalEthTransferred = Math.round(eth);
this.totalUsdTransferred = usd ? Math.round(usd) : null;
} catch (e) {
console.error('TOTAL', e);
}
}

getFormattedUSDTranferred() {
Expand Down
8 changes: 6 additions & 2 deletions electron-app/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ function createWindow() {
}
});

// mainWindow.webContents.openDevTools();

// Load the index.html of the app.
mainWindow.loadURL(MAIN_URL);

Expand All @@ -70,6 +68,12 @@ function createWindow() {
enabled: false
},
{ type: 'separator' },
{
label: 'Open Dev Tools',
click() {
mainWindow.webContents.openDevTools();
}
},
{
label: 'Report an Issue',
click() {
Expand Down
Loading

0 comments on commit 0279c64

Please sign in to comment.