Update wallet UI to use PaperclipChain
- Remove Ethereum/Web3 references from HTML - Create PaperclipWallets class with Ed25519 key support - Add PaperclipDatabase for wallet storage - Update module loading order in index.html - Convert button classes from btn-etho to btn-clips
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
const {ipcRenderer} = require("electron");
|
||||
|
||||
class Wallets {
|
||||
class PaperclipWallets {
|
||||
constructor() {
|
||||
this.addressList = [];
|
||||
|
||||
$.getJSON("https://min-api.cryptocompare.com/data/price?fsym=ETHO&tsyms=USD", function (price) {
|
||||
EthoWallets._setPrice(price.USD);
|
||||
});
|
||||
this.price = 0; // CLIPS price placeholder
|
||||
}
|
||||
|
||||
_getPrice() {
|
||||
@@ -35,32 +32,32 @@ class Wallets {
|
||||
|
||||
addAddressToList(address) {
|
||||
if (address) {
|
||||
this.addressList.push(address.toLowerCase());
|
||||
this.addressList.push(address); // CLIPS addresses are case-sensitive
|
||||
}
|
||||
}
|
||||
|
||||
enableButtonTooltips() {
|
||||
EthoUtils.createToolTip("#btnNewAddress", "Create New Address");
|
||||
EthoUtils.createToolTip("#btnRefreshAddress", "Refresh Address List");
|
||||
EthoUtils.createToolTip("#btnExportAccounts", "Export Accounts");
|
||||
EthoUtils.createToolTip("#btnImportAccounts", "Import Accounts");
|
||||
EthoUtils.createToolTip("#btnImportFromPrivateKey", "Import From Private Key");
|
||||
PaperclipUtils.createToolTip("#btnNewAddress", "Create New Address");
|
||||
PaperclipUtils.createToolTip("#btnRefreshAddress", "Refresh Address List");
|
||||
PaperclipUtils.createToolTip("#btnExportAccounts", "Export Accounts");
|
||||
PaperclipUtils.createToolTip("#btnImportAccounts", "Import Accounts");
|
||||
PaperclipUtils.createToolTip("#btnImportFromPrivateKey", "Import From Private Key");
|
||||
}
|
||||
|
||||
validateNewAccountForm() {
|
||||
if (EthoMainGUI.getAppState() == "account") {
|
||||
if (PaperclipMainGUI.getAppState() == "account") {
|
||||
if (!$("#walletPasswordFirst").val()) {
|
||||
EthoMainGUI.showGeneralError("Password cannot be empty!");
|
||||
PaperclipMainGUI.showGeneralError("Password cannot be empty!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$("#walletPasswordSecond").val()) {
|
||||
EthoMainGUI.showGeneralError("Password cannot be empty!");
|
||||
PaperclipMainGUI.showGeneralError("Password cannot be empty!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($("#walletPasswordFirst").val() !== $("#walletPasswordSecond").val()) {
|
||||
EthoMainGUI.showGeneralError("Passwords do not match!");
|
||||
PaperclipMainGUI.showGeneralError("Passwords do not match!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user