Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei0x309 committed Jan 11, 2025
2 parents af1c38e + 3232ddb commit 33147ae
Show file tree
Hide file tree
Showing 12 changed files with 148 additions and 62 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Manifest Version 1.4.9

- updated dependencies and Vite to 6
- added celo network to the network templates
- updated some network icons & added a network icon template
- added ability to also select from account address(in your wallet) when selecting a contact

## Manifest Version 1.4.8

- updated dependencies
Expand Down
5 changes: 3 additions & 2 deletions PRIVACY_POLICY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
## Privacy Points:

- This extension does not collect any data form your device.
- All storage uses chrome.storage.local
- All storage uses chrome.storage.local (local storage) which is only accessible by the extension.
- This extension does not use external files, everything is packed into the extension.
- This extension uses the manifest V3 which does not allow any third party scripts to be injected.
- This extension is completely open source, the source is available on Github - [https://github.com/andrei0x309/clear-wallet](https://github.com/andrei0x309/clear-wallet).

### 𝐂𝐨𝐧𝐭𝐚𝐜𝐭:

Discord: andrei0x309#6562
Discord: andrei0x309
Website: [https://flashsoft.eu/#section-contact](https://flashsoft.eu/#section-contact)
Binary file modified bun.lockb
Binary file not shown.
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,38 @@
"only-pub": "bun run build && bun run ./release-scripts/create-release.ts"
},
"dependencies": {
"@ionic/vue": "^8.3.3",
"@ionic/vue-router": "^8.3.3",
"core-js": "^3.38.1",
"@ionic/vue": "^8.4.1",
"@ionic/vue-router": "^8.4.1",
"core-js": "^3.39.0",
"ethers": "^6.13.4",
"qr-scanner": "^1.4.2",
"vue": "^3.5.12",
"vue-router": "^4.4.5"
"vue": "^3.5.13",
"vue-router": "^4.5.0"
},
"devDependencies": {
"@crxjs/vite-plugin": "2.0.0-beta.25",
"@crxjs/vite-plugin": "2.0.0-beta.28",
"@types/archiver": "^6.0.3",
"@types/chrome": "^0.0.269",
"@types/chrome": "^0.0.287",
"@types/jest": "^29.5.14",
"@types/node": "^22.8.2",
"@typescript-eslint/eslint-plugin": "^8.12.1",
"@typescript-eslint/parser": "^8.12.1",
"@vitejs/plugin-vue": "^5.1.4",
"@vue/eslint-config-typescript": "^13.0.0",
"@types/node": "^22.10.2",
"@typescript-eslint/eslint-plugin": "^8.18.2",
"@typescript-eslint/parser": "^8.18.2",
"@vitejs/plugin-vue": "^5.2.1",
"@vue/eslint-config-typescript": "^14.2.0",
"archiver": "^7.0.1",
"eslint": "^9.13.0",
"eslint-plugin-vue": "^9.30.0",
"eslint": "^9.17.0",
"eslint-plugin-vue": "^9.32.0",
"http-browserify": "^1.7.0",
"https-browserify": "^1.0.0",
"jest": "^29.7.0",
"sass": "^1.80.4",
"sass": "^1.83.0",
"stream-browserify": "^3.0.0",
"ts-jest": "^29.2.5",
"tsx": "^4.19.2",
"typescript": "^5.6.3",
"typescript": "^5.7.2",
"util": "^0.12.5",
"vite": "^5.4.10",
"vue-tsc": "^2.1.8"
"vite": "^6.0.5",
"vue-tsc": "^2.2.0"
},
"disabledNativeDependencies": {
"@capacitor/app": "^5.0.6",
Expand Down
Binary file added public/assets/chain-icons/celo.webp
Binary file not shown.
Binary file added public/assets/chain-icons/celo_t.webp
Binary file not shown.
Binary file modified public/assets/chain-icons/rootstock.webp
Binary file not shown.
Binary file modified public/assets/chain-icons/rootstock_t.webp
Binary file not shown.
Binary file added repo_res/chain-icons.psd
Binary file not shown.
4 changes: 2 additions & 2 deletions src/extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"name": "__MSG_appName__",
"description": "__MSG_appDesc__",
"default_locale": "en",
"version": "1.4.8",
"version_name": "1.4.8",
"version": "1.4.9",
"version_name": "1.4.9",
"icons": {
"16": "assets/extension-icon/wallet_16.png",
"32": "assets/extension-icon/wallet_32.png",
Expand Down
17 changes: 17 additions & 0 deletions src/utils/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ export const mainNets: {[key: number]: Network} = {
symbol: 'DEGEN',
priceId: 'degen'
},
42220: {
name: 'Celo Mainenet',
rpc: 'https://forno.celo.org',
chainId: 42220,
explorer: 'https://celoscan.io/',
icon: 'celo.webp',
symbol: 'CELO',
priceId: 'celo'
}
}

export const testNets = {
Expand Down Expand Up @@ -166,6 +175,14 @@ export const testNets = {
explorer: 'https://testnet.cyberscan.co/',
icon: 'cyber_t.webp'
},
42220: {
name: 'Celo Mainenet',
rpc: 'https://forno.celo.org',
chainId: 42220,
explorer: 'https://celoscan.io/',
icon: 'celo.webp',
symbol: 'CELO',
}
}

export const allTemplateNets = {...mainNets, ...testNets}
Expand Down
141 changes: 101 additions & 40 deletions src/views/ContactsSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
<ion-buttons slot="start">
<ion-button @click="close">Close</ion-button>
</ion-buttons>
<ion-title>Select Contact</ion-title>
<ion-title>Select Address</ion-title>
</ion-toolbar>
</ion-header>
<ion-content class="ion-padding">
<ion-item>
<ion-button @click="openModalAddContact()" expand="block">Add contact</ion-button>
<ion-button @click="openModalAddContact()" expand="block"
>Add Contact Addr</ion-button
>
</ion-item>

<ion-item>
Expand All @@ -19,41 +21,85 @@

<ion-radio-group :value="selectedContact">
<ion-list-header>
<ion-label>Contacts</ion-label>
<ion-segment
style="width: auto; padding: 0.5rem; margin: 0.5rem"
:value="currentSegment"
mode="ios"
@ion-change="segmentChange"
>
<ion-segment-button value="contacts">
<ion-label>Addrs Contacts</ion-label>
</ion-segment-button>
<ion-segment-button value="wallet">
<ion-label>Addrs from Wallet</ion-label>
</ion-segment-button>
</ion-segment>
</ion-list-header>

<ion-list class="ion-padding" v-for="(item, index) in contacts" :key="index">
<ion-item>
<ion-radio
@click="changeSelected(item.address)"
slot="start"
:value="item"
:aria-label="item"
>
<ion-list>
<ion-item>
<ion-label>{{ item.name }}</ion-label>
</ion-item>
<ion-item>
<ion-label style="font-size: 0.75rem">{{ item.address }}</ion-label>
</ion-item>
</ion-list>
</ion-radio>
</ion-item>
<ion-item>
<ion-button @click="openModalAddContact(item.address)" expand="block"
>Edit contact</ion-button
>
<ion-button @click="deleteContact(item.address)" expand="block"
>Delete contact</ion-button
>
</ion-item>
</ion-list>
<ion-list v-if="!!!contacts.length">
<ion-item class="ion-padding">
<ion-label>No contacts found, please add at least one</ion-label>
</ion-item>
</ion-list>
<template v-if="currentSegment === 'contacts'">
<ion-list class="ion-padding" v-for="(item, index) in contacts" :key="index">
<ion-item>
<ion-radio
@click="changeSelected(item.address)"
slot="start"
:value="item"
:aria-label="item"
>
<ion-list>
<ion-item>
<ion-label>{{ item.name }}</ion-label>
</ion-item>
<ion-item>
<ion-label style="font-size: 0.75rem">{{ item.address }}</ion-label>
</ion-item>
</ion-list>
</ion-radio>
</ion-item>
<ion-item>
<ion-button @click="openModalAddContact(item.address)" expand="block"
>Edit contact</ion-button
>
<ion-button @click="deleteContact(item.address)" expand="block"
>Delete contact</ion-button
>
</ion-item>
</ion-list>
<ion-list v-if="!!!contacts.length">
<ion-item class="ion-padding">
<ion-label>No contacts found, please add at least one</ion-label>
</ion-item>
</ion-list>
</template>
<template v-if="currentSegment === 'wallet'">
<ion-list
class="ion-padding"
v-for="(item, index) in walletAddresses"
:key="index"
>
<ion-item>
<ion-radio
@click="changeSelected(item.address)"
slot="start"
:value="item"
:aria-label="item"
>
<ion-list>
<ion-item>
<ion-label>{{ item.name }}</ion-label>
</ion-item>
<ion-item>
<ion-label style="font-size: 0.75rem">{{ item.address }}</ion-label>
</ion-item>
</ion-list>
</ion-radio>
</ion-item>
</ion-list>
<ion-list v-if="!!!walletAddresses.length">
<ion-item class="ion-padding">
<ion-label>No addresses found in wallet, please add at least one</ion-label>
</ion-item>
</ion-list>
</template>
</ion-radio-group>

<ion-loading
Expand Down Expand Up @@ -90,13 +136,15 @@ import {
} from "@ionic/vue";
import { ref, onMounted, Ref } from "vue";
import AddContact from "@/views/AddContact.vue";
import { getContacts, replaceContacts } from "@/utils/platform";
import { getContacts, replaceContacts, getAccounts } from "@/utils/platform";
import type { Contact } from "@/extension/types";
const loading = ref(false);
let intialContacts = [] as Contact[];
const contacts = ref([]) as Ref<Contact[]>;
const walletAddresses = ref([]) as Ref<Contact[]>;
const selectedContact = ref(null) as Ref<Contact | null>;
const currentSegment = ref("contacts");
const onSearch = (e: any) => {
const text = e.target.value;
Expand All @@ -111,10 +159,23 @@ const onSearch = (e: any) => {
}
};
const convertAccountsToContacts = async () => {
const accounts = await getAccounts();
walletAddresses.value = accounts.map((item) => ({
name: item.name,
address: item.address,
}));
};
const segmentChange = (e: CustomEvent) => {
currentSegment.value = e.detail.value;
};
const loadContacts = async () => {
loading.value = true;
intialContacts = await getContacts();
contacts.value = intialContacts;
await convertAccountsToContacts();
loading.value = false;
};
Expand Down Expand Up @@ -165,9 +226,9 @@ const changeSelected = (address: string) => {
const close = () => {
try {
modalController.dismiss(null, "cancel");
} catch {
// ignore
}
modalController.dismiss(null, "cancel");
} catch {
// ignore
}
};
</script>

0 comments on commit 33147ae

Please sign in to comment.