Update wallets.js

Event listener for click button
This commit is contained in:
newCodeRunner
2020-12-08 18:47:41 +05:00
committed by GitHub
parent 1521eebb9e
commit a2f894d822

View File

@@ -179,6 +179,20 @@ $(document).on("render_wallets", function () {
});
});
$(".btnDeleteAddress").off("click").on("click", function () {
const address = $(this).attr("data-wallet");
EthoMainGUI.showGeneralConfirmation(
`Do you really want to delete Wallet with Address: ${address}? This action can not be reversed.`,
function (result) {
if (result) {
const deleteResult = ipcRenderer.sendSync('deteteAccount', address);
if (deleteResult !== true) EthoMainGUI.showGeneralError(deleteResult);
setTimeout(EthoWallets.renderWalletsState, 1000);
}
},
);
});
$(".btnChangWalletName").off("click").on("click", function () {
var walletAddress = $(this).attr("data-wallet");
var walletName = $(this).attr("data-name");