From 97d37021f0a289846aff7f85f2c96ae5b8b19009 Mon Sep 17 00:00:00 2001 From: Andrei O Date: Sun, 11 Feb 2024 21:21:16 +0200 Subject: [PATCH] chore: other changes added in changelog --- CHANGELOG.md | 2 ++ src/views/AddAccount.vue | 55 ++++++++++++++++++++++++++++++++++++--- src/views/SettingsTab.vue | 21 +++++++-------- 3 files changed, 64 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa71646..4e611d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ - improved eth_call and eth_blockNumber to be more compatible with older websites - better error internal handling - modify the receipt returned to resamble more the one from Metamask +- change some notes in about +- refactored account name edit to be more user friendly ## Manifest Version 1.3.2 diff --git a/src/views/AddAccount.vue b/src/views/AddAccount.vue index 76c12ac..691da21 100644 --- a/src/views/AddAccount.vue +++ b/src/views/AddAccount.vue @@ -42,9 +42,16 @@ Cancel - {{ - isEdit ? "Edit Account" : "Add Account" - }} + {{ isEdit ? "Edit Account" : "Add Account" }} { + const findIndex = accounts.findIndex((a) => a.address === address); + const pArr: Array> = []; + if (findIndex !== -1) { + accounts.splice(findIndex, 1); + pArr.push(replaceAccounts([...accounts])); + } + await Promise.all(pArr); + }; + + const onEditAccount = async () => { + if (name.value.length < 1) { + alertMsg.value = "Name cannot be empty."; + alertOpen.value = true; + return; + } + const accounts = (await accountsProm) as Account[]; + const account = accounts.find((acc) => acc.address === paramAddress); + if (!account) { + alertMsg.value = "Account not found."; + alertOpen.value = true; + return; + } + const savedAcc = { + address: account.address, + name: name.value, + pk: account.pk, + encPk: account.encPk, + }; + await deleteAccount(account.address, accounts); + + await saveAccount(savedAcc); + router.push("/tabs/accounts"); + }; + const onAddAccount = async () => { let p1 = Promise.resolve(); + if (name.value.length < 1) { + alertMsg.value = "Name cannot be empty."; + alertOpen.value = true; + return; + } if (pk.value.length === 64) { pk.value = `0x${pk.value.trim()}`; } @@ -320,6 +368,7 @@ export default defineComponent({ mnemonic, mnemonicIndex, extractMnemonic, + onEditAccount, }; }, }); diff --git a/src/views/SettingsTab.vue b/src/views/SettingsTab.vue index c5ae249..d334a6b 100644 --- a/src/views/SettingsTab.vue +++ b/src/views/SettingsTab.vue @@ -120,13 +120,12 @@ and Ethers.

- It emulates Metamask Wallet and can be used as a drop-in replacement, right - now if you have both extensions, CLW will overwrite Metamask. -

-

- Main philosophy of the wallet is: no trackers, full control, export/import - JSONs with accounts, fast generate new accounts, and wipe everything with - one click. + Unlike most wallets, this wallet has no ads, no analytics, no trackers, no + bloatware, no telemetry, no data collection, no sponsored content, no + sponsored Dapps, no sponsored tokens, no sponsored NFTs, no sponsored + anything. It is a clean wallet with no revenue model, made by a single + developer, if you want to support this project financially you can donate at + andrei0x309.eth.

Github Repo: @@ -134,6 +133,10 @@ >LINK

+

+ Docs Website: + LINK +


Places you can check me out:

@@ -148,10 +151,6 @@ Blog Flashsoft LINK

-

- Crypto-Leftists Discord - LINK -