Skip to content

Commit

Permalink
Merge pull request #21 from consensus-ai/development
Browse files Browse the repository at this point in the history
Merge development into master.
  • Loading branch information
AlexanderBelonogov committed Mar 19, 2020
2 parents bcd49d7 + 5800e55 commit 45dc6bc
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 16 deletions.
36 changes: 28 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sentient-ui",
"version": "1.1.0",
"version": "1.1.1",
"main": "dist/main.js",
"author": "Consensus AI",
"description": "A UI application for interfacing with Sentient Network",
Expand Down Expand Up @@ -46,6 +46,7 @@
"webpack": "^2.5.1"
},
"dependencies": {
"acorn": "^7.1.1",
"ajv": "^6.5.5",
"babel-polyfill": "^6.26.0",
"bignumber.js": "^4.1.0",
Expand All @@ -56,6 +57,7 @@
"hoist-non-react-statics": "^3.1.0",
"immutable": "^3.8.1",
"js-yaml": "^3.13.1",
"minimist": "^1.2.5",
"mkdirp": "^0.5.1",
"moment": "^2.22.2",
"react": "^15.6.2",
Expand Down
5 changes: 3 additions & 2 deletions plugins/About/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { platform } from 'os'
import { remote, shell } from 'electron'
import yaml from 'js-yaml'
import semver from 'semver'
import request from 'request'
const dialog = remote.dialog
const fs = remote.require('fs')
Expand All @@ -26,7 +27,7 @@ const genDownloadLink = version => {
const getVersion = async () => {
try {
const response = await new Promise((resolve, reject) => {
request('https://s3.us-east-2.amazonaws.com/consensus-ai-releases/sentient-ui-test/latest-mac.yml', (err, resp, body) => {
request('https://s3.us-east-2.amazonaws.com/consensus-ai-releases/sentient-ui/latest-mac.yml', (err, resp, body) => {
if (err) reject(err)
resolve(body)
})
Expand Down Expand Up @@ -123,7 +124,7 @@ const updateCheck = async () => {
hideError()
const version = await getVersion()
document.getElementsByClassName('load')[0].style.display = 'none'
if (version !== VERSION) {
if (semver.lt(VERSION, version)) {
try {
document.getElementsByClassName('info-container')[0].style.display = 'none'
dialog.showSaveDialog({
Expand Down
2 changes: 1 addition & 1 deletion plugins/Miner/js/components/poolstatsgraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const PoolStatsGraph = ({poolHistory, mining}) => {
{ poolHistory.length > 0 && (
<ResponsiveContainer width="100%" height={220}>
<BarChart data={poolHistory} margin={{ top: 60, right: 5 }}>
<YAxis dataKey="baraccepted" />
<YAxis dataKey="barsubmitted" />
<Tooltip
position={{ y: -35 }}
offset={0}
Expand Down
2 changes: 1 addition & 1 deletion plugins/Miner/js/constants/error.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions plugins/Miner/js/sagas/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ export const formatHistory = (data, timeOffset, fixedDuration) => {
if(data.length) {
const formatedData = data.reduce((rv, stats) => {
let [time, submitted, accepted] = stats
let accepted_percent = (accepted * 100 / submitted).toFixed(2)
let acceptedPercent = (accepted * 100 / submitted).toFixed(2)
rv[time] = {
time: time,
accepted: accepted_percent,
rejected: (100 - accepted_percent).toFixed(2),
accepted: acceptedPercent,
rejected: (100 - acceptedPercent).toFixed(2),
barsubmitted: submitted,
baraccepted: accepted,
barrejected: (submitted - accepted)
}
Expand Down

0 comments on commit 45dc6bc

Please sign in to comment.