@@ -59,9 +59,9 @@ rm simplewallet_cli_windows.zip | |||
zip -r simplewallet_cli_windows.zip simplewallet_cli_windows | |||
cd /home/jojapoppa/fedoragold-wallet-electron | |||
#linux build | |||
cp /home/jojapoppa/fedoragold-pastebin/latest_linux_build/ubuntu18_04/fedoragold_daemon bin_linux/linux | |||
cp /home/jojapoppa/fedoragold-pastebin/latest_linux_build/ubuntu18_04/fedoragold_walletd bin_linux/linux | |||
#linux build 18_04 | |||
cp /home/jojapoppa/fedoragold-pastebin/latest_linux_build/ubuntu16/fedoragold_daemon bin_linux/linux | |||
cp /home/jojapoppa/fedoragold-pastebin/latest_linux_build/ubuntu16/fedoragold_walletd bin_linux/linux | |||
rm -r bin | |||
cp -r bin_linux bin | |||
npm run dist-lin --no-bin-link --rollback=false | |||
@@ -1427,7 +1427,7 @@ const checkDaemonTimer = setIntervalAsync(() => { | |||
log.warn("Previous daemon was detected... restarting it..."); | |||
if (app.threeTriesToKill > 2) { | |||
log.warn("clobber old daemon... soft terminate failed..."); | |||
log.warn("restarting old daemon... soft terminate failed..."); | |||
clobber(false, true, procID); | |||
app.threeTriesToKill = 0; | |||
} else { | |||
@@ -1896,7 +1896,7 @@ app.on('activate', () => { | |||
}); | |||
process.on('uncaughtException', function (e) { | |||
log.error(`Uncaught exception: ${e.message}`); | |||
//log.error(`Uncaught exception: ${e.message}`); | |||
app.quit; | |||
}); | |||
@@ -2,7 +2,7 @@ | |||
"name": "FedoraGoldWallet", | |||
"productName": "FedoraGoldWallet", | |||
"description": "FedoraGold (FED) GUI Wallet", | |||
"version": "v3.6.7", | |||
"version": "v3.6.8", | |||
"homepage": "https://github.com/jojapoppa/fedoragold-wallet-electron", | |||
"repository": "https://github.com/jojapoppa/fedoragold-wallet-electron", | |||
"main": "main.js", | |||
@@ -16,8 +16,8 @@ | |||
"dist-lin": "./node_modules/.bin/electron-builder --x64 --linux" | |||
}, | |||
"engines": { | |||
"node": "v12.18.3", | |||
"npm": "7.14.0" | |||
"node": ">=12.18.3", | |||
"npm": ">=7.14.0" | |||
}, | |||
"keywords": [], | |||
"author": "FedoraGold (FED), Rixombea, Macroshock & TurtleCoin Developers", | |||
@@ -59,6 +59,8 @@ | |||
"forge": "^2.3.0", | |||
"fs-extra": "^9.1.0", | |||
"hdwalletprovider": "^1.7.0", | |||
"http": "^0.0.1-security", | |||
"https": "^1.0.0", | |||
"ip2int": "^1.0.1", | |||
"is-running": "^2.1.0", | |||
"keypair": "^1.0.3", | |||
@@ -75,6 +77,7 @@ | |||
"screen": "^0.2.10", | |||
"semver": "^5.7.1", | |||
"set-interval-async": "^1.0.34", | |||
"simple-get": "^4.0.1", | |||
"solc": "^0.8.9", | |||
"source-map-support": "^0.5.19", | |||
"ssh2": "^0.8.9", | |||
@@ -527,6 +527,7 @@ class WalletShellApi { | |||
}); | |||
}); | |||
} | |||
// send single transaction | |||
sendTransaction(useMixin, params, sourceAddr) { | |||
//this.logDebugMsg("api sendTransaction, useMixin: "+useMixin); | |||
@@ -670,7 +670,7 @@ WalletShellManager.prototype._spawnServiceParams = function(walletFile, password | |||
if (remote.app.integratedDaemon) { | |||
serviceArgs = [ | |||
'--data-dir', dataDir, | |||
'--container-file', walletFile, | |||
'--container-file', '"'+walletFile+'"', | |||
'--container-password', password, | |||
'--bind-address', '127.0.0.1', | |||
'--bind-port', this.walletdPort, | |||
@@ -689,7 +689,7 @@ WalletShellManager.prototype._spawnServiceParams = function(walletFile, password | |||
// Note: log level must be at least 1 | |||
serviceArgs = [ | |||
' --data-dir', dataDir, | |||
' --container-file', walletFile, | |||
' --container-file', '"'+walletFile+'"', | |||
' --container-password', password, | |||
' --bind-address', '127.0.0.1', | |||
' --bind-port', this.walletdPort, | |||
@@ -704,7 +704,7 @@ WalletShellManager.prototype._spawnServiceParams = function(walletFile, password | |||
// Note: log level must be at least 1 | |||
serviceArgs = [ | |||
' --data-dir', dataDir, | |||
' --container-file', walletFile, | |||
' --container-file', '"'+walletFile+'"', | |||
' --container-password', password, | |||
' --bind-address', '127.0.0.1', | |||
' --bind-port', this.walletdPort, | |||
@@ -774,6 +774,8 @@ function checkWalletdTimer(inst) { | |||
default: break; | |||
} | |||
//log.warn("cmd: "+cmd); | |||
// the x: 0 is a workaround for the ENOMEM bug in nodejs: https://github.com/nodejs/node/issues/29008 | |||
var procStr = ''; | |||
var status = false; | |||
@@ -790,7 +792,7 @@ function checkWalletdTimer(inst) { | |||
var procAry = splitLines(procStr); | |||
procStr = ""; | |||
var dloc = procAry.findIndex(element => element.includes('fedoragold_wall')) | |||
//log.warn("dloc index is: "+dloc); | |||
//log.warn("dloc (location of fedoragold_wall string) index is: "+dloc); | |||
if (dloc >= 0) { | |||
procStr = procAry[dloc]; | |||
let procStr2 = ''; | |||
@@ -824,13 +826,13 @@ function checkWalletdTimer(inst) { | |||
if ((aargu.length > 0) && !global.terminateServiceMode) { | |||
try { | |||
//log.warn("run walletd: "+rrunBin+aargu); | |||
global.serviceProcess = childProcess.exec(rrunBin+aargu, | |||
{detached: true, stdio: ['pipe','pipe','pipe']}); | |||
//log.warn("serviceProcess: "+global.serviceProcess); | |||
//log.warn("setup pids: "+global.serviceProcess.pid); | |||
servicePid = global.serviceProcess.pid; | |||
//log.warn("walletd running..."); | |||
} catch(e) { | |||
//log.error(`${config.walletServiceBinaryFilename} is not running`); | |||
@@ -1144,10 +1146,6 @@ WalletShellManager.prototype.importFromSeed = function(walletFile, password, mne | |||
return new Promise((resolve, reject) => { | |||
scanHeight = scanHeight || 0; | |||
// jojapoppa - this is not supported i think... check. "seed" means | |||
// loads wallet from blockchain (no local storage) - very risky feature | |||
// ... i'm not sure i like it. even if we did this the webpage it | |||
// loads from would need to be distributed somehow... dunno about this... | |||
// for now, this nmematic seed web wallet feature is commented out | |||
let serviceArgs = wsm.serviceArgsDefault.concat([ | |||
'--container-file', walletFile, | |||
@@ -13,6 +13,7 @@ const fs = require('fs'); | |||
const log = require('electron-log'); | |||
const randomBytes = require('randombytes'); | |||
const writeCSV = require('@danieldsf/csv-utils').writeCSV; | |||
const get = require('simple-get'); | |||
const { setIntervalAsync } = require('set-interval-async/dynamic'); | |||
const { clearIntervalAsync } = require('set-interval-async') | |||
@@ -2193,7 +2194,7 @@ function handleSendTransfer(){ | |||
<dt class="dt-ib">FED Transaction Fee:</dt> | |||
<dd class="dd-ib">${fee} ${config.assetTicker}</dd> | |||
<dt class="dt-ib">Rebalance Fee (rebalancetoken.io):</dt> | |||
<dd class="dd-ib">1 MATIC (on Polygon network)</dd> | |||
<dd class="dd-ib">1 MATIC + gas (on Polygon network)</dd> | |||
<dt class="dt-ib">Total FED:</dt> | |||
<dd class="dd-ib">${total} ${config.assetTicker}</dd> | |||
</dl> | |||
@@ -2230,6 +2231,17 @@ function handleSendTransfer(){ | |||
return tpl; | |||
} | |||
function testRebalanceBridge() { | |||
let url = "https://fedgoldwebservice.herokuapp.com/getapprovedfedamount?signature=NKtesZMBK4SEajCw566 vPC9ccvjkNbuS3i6DBS4MHWPtSHKLjUYtaAci4SaUXEjCGSdfLSSixvMmy3G316XmJytB2niSsWuXCqw2vE1Be2UcqTGJ3vhukQD3GFYVCR dmmyv72LfqYSK&transaction_id=b548de48476102c4a26138af78bccc4f89a1a4f8ae4ee85b4ef11ec98a4ad120"; | |||
return new Promise((resolve, reject) => { | |||
get.concat(url, function (err, res, data) { | |||
if (err) { reject(new Error('RebalanceBridge is down: '+err)); } | |||
else { resolve(data); } | |||
}); | |||
}); | |||
} | |||
function sendEvent() { | |||
formMessageReset(); | |||
function precision(a) { | |||
@@ -2352,8 +2364,28 @@ function handleSendTransfer(){ | |||
let useMixin = mix.checked; | |||
formMessageSet('send', 'warning', 'Sending transaction, please wait...<br><progress></progress>'); | |||
let waladdr = wsession.get('loadedWalletAddress'); | |||
//log.warn("sendTx from addr: "+waladdr); | |||
sendTx(useMixin, tx, waladdr, recipientAddress, paymentId); | |||
if (bTokenIssuance) { | |||
log.warn("test Rebalance Bridge.."); | |||
testRebalanceBridge().then((httpresult) => { | |||
//alert("httpresult: "+httpresult); | |||
if (httpresult.indexOf("200000000") > -1) { | |||
sendTx(useMixin, tx, waladdr, recipientAddress, paymentId); | |||
} | |||
}).catch((err) => { | |||
let sEMsg = "Rebalance Bridge is down. Please try again later."; | |||
alert(sEMsg); | |||
}); | |||
} else { | |||
//log.warn("useMixin: "+useMixin); | |||
//log.warn("waladdr: "+waladdr); | |||
//log.warn("recipientAddress: "+recipientAddress); | |||
//log.warn("paymentId: "+paymentId); | |||
//log.warn("tx: "+JSON.stringify(tx)); | |||
sendTx(useMixin, tx, waladdr, recipientAddress, paymentId); | |||
} | |||
wsutil.clearChild(md); | |||
}); | |||