Skip to content

Commit 72e2c01

Browse files
committed
Update Linux
2 parents 959fa03 + 8dcad0c commit 72e2c01

File tree

6 files changed

+45
-19
lines changed

6 files changed

+45
-19
lines changed

src/common/loadingProgress.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ const chainErrorHandle = () => {
168168
let osType = os.type();
169169
switch (osType) {
170170
case "Linux":
171-
shell.cd(".expanse");
172-
console.log(shell.ls(''));
171+
shell.cd("/.expanse");
173172
exec('rm -rf gexp', {maxBuffer: 1024 * 5000}, (err, stdout, stderr) => {
174173
if (err) {
175174
console.log(`error: ${err}`);
@@ -181,7 +180,6 @@ const chainErrorHandle = () => {
181180
break;
182181
case "Darwin":
183182
shell.cd("Library/Expanse");
184-
console.log(shell.ls(''));
185183
exec('rm -rf gexp', {maxBuffer: 1024 * 5000}, (err, stdout, stderr) => {
186184
if (err) {
187185
console.log(`error: ${err}`);

src/main/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ const runGexp = (path) => {
128128
let textChunk = data.toString('utf8');
129129
if(mainWindow){
130130
mainWindow.webContents.send('gexpLogsstder', JSON.stringify(textChunk));
131-
if(data.toString('utf8') && data.toString('utf8').split(' ')[2] === "Head" && data.toString('utf8').split(' ')[3] === "state" && data.toString('utf8').split(' ')[4] === "missing," && data.toString('utf8').split(' ')[5] === "repairing" && data.toString('utf8').split(' ')[6] === "chain"){
132-
// if(data.toString('utf8') && data.toString('utf8').split(' ')[2] === "UDP" && data.toString('utf8').split(' ')[3] === "listener" && data.toString('utf8').split(' ')[4] === "up"){
131+
if(textChunk.includes('Rewinding blockchain')){
132+
// if(data.toString('utf8') && data.toString('utf8').split(' ')[2] === "Head" && data.toString('utf8').split(' ')[3] === "state" && data.toString('utf8').split(' ')[4] === "missing," && data.toString('utf8').split(' ')[5] === "repairing" && data.toString('utf8').split(' ')[6] === "chain"){
133133
console.log("chainrRepairError ");
134134
chainError = true;
135135
gexpProc.kill();
@@ -146,8 +146,6 @@ const runGexp = (path) => {
146146
}
147147
}
148148
// process utf8 text chunk
149-
150-
151149
});
152150
}catch(e){
153151
console.log("Error",e);

src/renderer/components/DasboardComponents/Header/Header.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,15 @@
176176
},
177177
currenciesData: function(){
178178
this.currency = this.$store.state.currencies;
179+
var curNew= this.currency;
179180
got('https://min-api.cryptocompare.com/data/pricemultifull?fsyms=EXP&tsyms=USD,BTC,EXP', {
180181
json: true
181182
}).then(response => {
183+
curNew = response.body.DISPLAY.EXP;
182184
this.currency = response.body.DISPLAY.EXP;
185+
$(".currValue").text(curNew['USD'].PRICE);
183186
},(error) => {
184187
});
185-
// console.log(this.currency, "currency");
186188
return this.currency;
187189
},
188190
totalBalanceData: function(){
@@ -215,7 +217,7 @@
215217
// console.log(this.$store.state.gexpSync)
216218
// console.log(this.currenciesData, "currencies")
217219
if(this.$store.state.gexpSync){
218-
console.log(this.$store.state.gexpSync, "this.$store.state.gexpSync.currentBlock")
220+
// console.log(this.$store.state.gexpSync, "this.$store.state.gexpSync.currentBlock")
219221
web3.eth.getBlock(this.$store.state.gexpSync.currentBlock).then((res) => {
220222
this.timeStamp = moment(res.timestamp * 1000).fromNow();
221223
});
@@ -241,7 +243,7 @@
241243
},
242244
methods: {
243245
handleCurrency(curr){
244-
console.log("web3 this.curr", curr);
246+
// console.log("web3 this.curr", curr);
245247
if(curr == 'USD'){
246248
this.defaultCurrencySign = '$';
247249
}else {

src/renderer/components/DasboardComponents/WalletDashboardComponents/walletcommon.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ let Lab_balance = 0;
2626
let PEX_balance = 0;
2727

2828
const fixpath = () =>{
29-
if((shell.ls('') && shell.ls('')[0]) === 'gexp'){
29+
// console.log("check path", shell.ls(''), shell.ls('') && shell.ls('').find((ele)=> console.log(ele)));
30+
if(shell.ls('') && shell.ls('').find((ele)=> ele === "gexp.exe")){
31+
// console.log("check path", shell.ls(''));
3032
shell.cd('..');
3133
shell.cd('..');
3234
}

src/renderer/components/SplashScreen/SplashScreen.vue

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
d="M16.134,17.749L16.76,4.884H12.273L12.9,17.749h3.237Zm-1.617,1.419a2.454,2.454,0,0,0-2.557,2.584,2.456,2.456,0,0,0,2.5,2.586h0.057a2.445,2.445,0,0,0,2.525-2.586A2.444,2.444,0,0,0,14.516,19.168Z"/>
228228
</svg>
229229
</div>
230-
<label>Expanse node broken chain error</label>
230+
<label>Chain rewinding error</label>
231231
<label>Retrying to install again</label>
232232
</div>
233233
</div>
@@ -278,6 +278,9 @@
278278
return {
279279
activeScreen: this.$store.state.screenState,
280280
networkSetting: true,
281+
cb: 0,
282+
totalblock: 0,
283+
hb: 0,
281284
};
282285
},
283286
created(){
@@ -287,7 +290,26 @@
287290
// console.log(this.activeScreen,"activeScreenAPP")
288291
},
289292
computed:
290-
{
293+
{
294+
currentblockData: function(){
295+
// console.log(this.$store.state.gexpSync,"this.$/ store.state.peerCount");
296+
if(this.$store.state.gexpSync.currentBlock){
297+
this.cb = this.$store.state.gexpSync.currentBlock;
298+
this.totalblock = this.$store.state.gexpSync.currentBlock;
299+
} else {
300+
this.cb = this.$store.state.currentblock;
301+
this.totalblock = this.$store.state.currentblock;
302+
}
303+
return this.cb;
304+
},
305+
highestblockData: function(){
306+
if(this.$store.state.gexpSync.currentBlock){
307+
this.hb = this.$store.state.gexpSync.highestBlock;
308+
} else {
309+
this.hb = this.$store.state.currentblock;
310+
}
311+
return this.hb;
312+
},
291313
chainErrorData() {
292314
ipcRenderer.on('chainrRepairError', (event, res) => {
293315
console.log(res, 'chainrRepairError------01');

src/renderer/views/SplashApp.vue

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@
3535
import * as child_process from 'child_process';
3636
3737
const clientBinariesGexp = clientBinaries.clients.Gexp;
38-
const localGethVersion = clientBinariesGexp.version;
38+
let localGethVersion = clientBinariesGexp.version;
3939
const platForms = clientBinariesGexp.platforms;
4040
let newClinetBinaries = clientBinaries;
4141
var versionUpdate = false;
4242
43-
4443
export default {
4544
name: 'lunawalletvuetest',
4645
created(){
4746
this.chekAppInfo();
47+
4848
ExpApi();
4949
},
5050
data() {
@@ -75,6 +75,8 @@
7575
if(production){
7676
shell.cd(clientInfo.appPath);
7777
gexpPath = clientInfo.dirPath;
78+
var data = fs.readFileSync('./clientBinaries.json', 'utf8');
79+
localGethVersion = JSON.parse(data).clients.Gexp.version;
7880
}
7981
else
8082
{
@@ -96,6 +98,8 @@
9698
else
9799
cmd = 'ping -c 1 www.google.com';
98100
101+
var data=fs.readFileSync('./clientBinaries.json', 'utf8');
102+
var words=JSON.parse(data);
99103
var child = exec(cmd, function(er, stdout, stderr){
100104
if(er !== null){
101105
console.log("error founds");
@@ -111,9 +115,9 @@
111115
.then(response => {
112116
let latestGethVersion = response.body.tag_name;
113117
newClinetBinaries.clients.Gexp.version = latestGethVersion;
114-
// console.log(latestGethVersion, "ulatestGethVersionrl1---------------------------");
118+
// console.log( localGethVersion, "localGethVersion", latestGethVersion, "ulatestGethVersionrl1---------------------------");
115119
// console.log(response.body.tag_name, "urresponsel1---------------------------");
116-
if(response.body.tag_name !== localGethVersion){
120+
if(response.body.tag_name != localGethVersion){
117121
versionUpdate = true;
118122
console.log('update binaries files');
119123
// For each platform/arch in clientBinaries.json
@@ -147,8 +151,8 @@
147151
} // if ended -- if(response.body.tag_name !== localGethVersion)
148152
149153
}).then(res => {
150-
console.log("versionUpdate", versionUpdate);
151-
if (versionUpdate === true) {
154+
// console.log("versionUpdate", versionUpdate, newClinetBinaries);
155+
if (versionUpdate == true) {
152156
// console.log(shell.ls(''),"shellls in writeFile clientBinaries");
153157
fs.writeFile(
154158
'./clientBinaries.json',

0 commit comments

Comments
 (0)