rebranding upgrade and various fixes
This commit is contained in:
@@ -13,10 +13,10 @@ class Markets {
|
||||
$("#marketcap").html(data.market_data.market_cap.usd.toFixed(0) + " $ (" + data.market_cap_rank + ")");
|
||||
$("#dailyVolume").html(data.market_data.total_volume.usd.toFixed(0) + " $");
|
||||
|
||||
$("#changeUSD").html("7 days change: " + data.market_data.price_change_percentage_7d_in_currency.usd.toFixed(2) + "%");
|
||||
$("#changeBTC").html("7 days change: " + data.market_data.price_change_percentage_7d_in_currency.btc.toFixed(2) + "%");
|
||||
$("#changeMarketcap").html("high 24h: " + data.market_data.high_24h.usd.toFixed(5) + " $");
|
||||
$("#changeVolume").html("all time high: " + data.market_data.ath.usd.toFixed(5) + " $");
|
||||
$("#changeUSD").html(data.market_data.price_change_percentage_7d_in_currency.usd.toFixed(2) + "%");
|
||||
$("#changeBTC").html(data.market_data.price_change_percentage_7d_in_currency.btc.toFixed(2) + "%");
|
||||
$("#changeMarketcap").html(data.market_data.high_24h.usd.toFixed(5) + "$");
|
||||
$("#changeVolume").html(data.market_data.ath.usd.toFixed(5) + "$");
|
||||
|
||||
new Chart(document.getElementById("chartMarketPriceCanvas"), {
|
||||
type: "line",
|
||||
@@ -29,7 +29,7 @@ class Markets {
|
||||
fill: true,
|
||||
borderWidth: 3,
|
||||
pointRadius: 0,
|
||||
borderColor: "#7A1336"
|
||||
borderColor: "#25D4DC"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -55,7 +55,7 @@ class Markets {
|
||||
}
|
||||
},
|
||||
gridLines: {
|
||||
color: "rgba(255,255,255,.08)"
|
||||
color: "rgba(255,255,255,.35)"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -57,17 +57,29 @@ class SendTransaction {
|
||||
|
||||
$(document).on("render_send", function () {
|
||||
//$("select").formSelect({classes: "fromAddressSelect"});
|
||||
setTimeout(() => {
|
||||
var optionText = $("#sendFromAddress").find("option:selected").text();
|
||||
var selectedAddressBalance = optionText.substr(0, optionText.indexOf("|"));
|
||||
|
||||
console.log("selectedAddressBalance", selectedAddressBalance);
|
||||
$("#sendMaxAmmount").html(parseFloat(selectedAddressBalance));
|
||||
//$("#sendAmmount").val(selectedAddressBalance);
|
||||
}, 500);
|
||||
|
||||
|
||||
|
||||
$("#sendFromAddress").on("change", function () {
|
||||
var optionText = $(this).find("option:selected").text();
|
||||
var addrName = optionText.substr(0, optionText.indexOf("-"));
|
||||
var addrValue = optionText.substr(optionText.indexOf("-") + 1);
|
||||
$(".fromAddressSelect input").val(addrValue.trim());
|
||||
$("#sendFromAddressName").html(addrName.trim());
|
||||
|
||||
web3Local.eth.getBalance(this.value, function (error, balance) {
|
||||
$("#sendMaxAmmount").html(parseFloat(web3Local.utils.fromWei(balance, "ether")));
|
||||
});
|
||||
var addrBalance = optionText.substr(0, optionText.indexOf("|"));
|
||||
var addrName = optionText.substr(optionText.indexOf("|")+1);
|
||||
var addrValue = addrName.substr(addrName.indexOf("|")+1);
|
||||
|
||||
|
||||
$(".fromAddressSelect input").val(addrValue.trim());
|
||||
|
||||
$("#sendMaxAmmount").html(parseFloat(addrBalance));
|
||||
|
||||
});
|
||||
|
||||
$("#btnSendAll").off("click").on("click", function () {
|
||||
@@ -98,9 +110,27 @@ $(document).on("render_send", function () {
|
||||
var adddressObject = {};
|
||||
adddressObject.address = key;
|
||||
adddressObject.name = addressBook[key];
|
||||
adddressObject.balance = 0;
|
||||
|
||||
addressList.addressData.push(adddressObject);
|
||||
|
||||
web3Local.eth.getBalance(key, function (error, balance) {
|
||||
if (error) {
|
||||
console.error("Error fetching balance:", error);
|
||||
return;
|
||||
}
|
||||
|
||||
// Update the balance display
|
||||
var etherBalance = web3Local.utils.fromWei(balance, "ether");
|
||||
//$("#sendFromAddressBalance").text("Balance: " + etherBalance + " ETHO");
|
||||
adddressObject.balance = parseFloat(etherBalance)
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$("#dlgAddressList").iziModal({width: "800px"});
|
||||
EthoMainGUI.renderTemplate("addresslist.html", addressList, $("#dlgAddressListBody"));
|
||||
|
||||
@@ -9,7 +9,7 @@ SyncProgress = new ProgressBar.Line("#syncProgress", {
|
||||
strokeWidth: 6,
|
||||
easing: "easeInOut",
|
||||
duration: 1400,
|
||||
color: "#7A1336",
|
||||
color: "#25D4DC",
|
||||
trailColor: "#eee",
|
||||
trailWidth: 1,
|
||||
text: {
|
||||
|
||||
@@ -114,7 +114,7 @@ class Wallets {
|
||||
$(document).trigger("render_wallets");
|
||||
EthoWallets.enableButtonTooltips();
|
||||
|
||||
$("#labelSumDollars").html(vsprintf("/ %.2f $ / %.4f $ per ETHO", [
|
||||
$("#labelSumDollars").html(vsprintf("= %.2f 💵 | %.4f 💵 per", [
|
||||
data.sumBalance * EthoWallets._getPrice(),
|
||||
EthoWallets._getPrice()
|
||||
]));
|
||||
@@ -231,15 +231,23 @@ $(document).on("render_wallets", function () {
|
||||
ipcRenderer.send("exportAccounts", {});
|
||||
});
|
||||
|
||||
$("#btnImportAccounts").off("click").on("click", function () {
|
||||
var ImportResult = ipcRenderer.sendSync("importAccounts", {});
|
||||
$("#btnImportAccounts").off("click").on("click", function () {
|
||||
ipcRenderer.send("importAccounts");
|
||||
|
||||
ipcRenderer.once("importAccountsReply", (event, importResult) => {
|
||||
if (importResult.success) {
|
||||
iziToast.success({ title: "Imported", message: importResult.text, position: "topRight", timeout: 2000 });
|
||||
// Reload wallets after successful import
|
||||
setTimeout(() => {
|
||||
EthoWallets.renderWalletsState();
|
||||
}, 500);
|
||||
} else {
|
||||
EthoMainGUI.showGeneralError(importResult.text);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
if (ImportResult.success) {
|
||||
iziToast.success({title: "Imported", message: ImportResult.text, position: "topRight", timeout: 2000});
|
||||
} else if (ImportResult.success == false) {
|
||||
EthoMainGUI.showGeneralError(ImportResult.text);
|
||||
}
|
||||
});
|
||||
|
||||
$("#btnImportFromPrivateKey").off("click").on("click", function () {
|
||||
$("#dlgImportFromPrivateKey").iziModal();
|
||||
|
||||
Reference in New Issue
Block a user