Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
9cd3295
devop: refactor updates state into pinia store
olgakup Feb 11, 2025
579a4e2
devop: create networks store
olgakup Feb 14, 2025
8f95d36
devop: refactor custom and test nets to use network store
olgakup Feb 14, 2025
9b844e2
devop: migrate networsk search
olgakup Feb 14, 2025
32870a2
devop: migrate menu under 1 component
olgakup Feb 14, 2025
16feaf8
feat: basic expand/collapse logic
olgakup Mar 10, 2025
6b089f7
feat: collapsed networks ui
olgakup Mar 10, 2025
a8ee9cc
fix: styles
olgakup Mar 10, 2025
a29de4f
fix: styles
olgakup Mar 10, 2025
954557e
feat: add render on scroll
olgakup Mar 11, 2025
2d3c620
feat: update bitcoin icons
olgakup Mar 17, 2025
132022a
devop: update colana icons
olgakup Mar 17, 2025
08d204a
devop: update polkadot icons
olgakup Mar 17, 2025
d431543
devop: update kadena icon
olgakup Mar 17, 2025
70b7e43
devop: update ethereum icons
olgakup Mar 17, 2025
03509bc
devop: add search button in collapsed menu
olgakup Mar 17, 2025
98b1cc6
fix: collapsed scroll area height
olgakup Mar 17, 2025
fe10aa8
devop: make icon buttons accessible
olgakup Mar 18, 2025
cf9de4a
fix: icon class name
olgakup Mar 18, 2025
e12aeef
fix: icon class name again
olgakup Mar 18, 2025
dad0d89
feat: add tooltips to networks on collapsed
olgakup Mar 18, 2025
e39e715
devop: fix width
olgakup Mar 18, 2025
4e95d4f
devop: fix drag
olgakup Mar 18, 2025
217cad6
devop: merge with develop update amplitude icon
olgakup Mar 18, 2025
60bb7a2
fix: z index of menu
olgakup Mar 18, 2025
6567b91
feat: save expanded to store
olgakup Mar 19, 2025
4be8224
Merge branch 'devop/pakage-updates' into feat/collapse-networks-menu
kvhnuke Mar 24, 2025
643b681
devop: update and fix the missing network
kvhnuke Mar 24, 2025
0293a1d
feat: add isExpanded state
olgakup Mar 25, 2025
ea04df2
devop: intilize isExpanded state before mount
olgakup Mar 25, 2025
e74ec74
feat: app dialog
olgakup Mar 26, 2025
4f6846f
devop: select assets use dialog
olgakup Mar 26, 2025
d53ae8e
devop: update select fee to use app dialog
olgakup Mar 27, 2025
a1e9007
devop: update network select to use dialog
olgakup Mar 27, 2025
3211917
devop: fix padding in deposit screen
olgakup Mar 27, 2025
17e7045
devop: fix padding in nft detail screen
olgakup Mar 27, 2025
05e3ea3
devop: update network assets to use dialog
olgakup Mar 27, 2025
0c4744d
fix: icons squeeshing
olgakup Mar 27, 2025
cd40ec1
chore: add comments
olgakup Mar 27, 2025
8cb681a
fix: warning
olgakup Mar 27, 2025
1e9d84d
chore: remove comments
olgakup Mar 27, 2025
3f3f908
devop: fix store
olgakup Mar 27, 2025
8d588c8
fix: warnings
kvhnuke Mar 27, 2025
72e4f11
Merge pull request #650 from enkryptcom/feat/app-dialog
olgakup Mar 27, 2025
912dadf
fix: if collapsed dont show searched networks
olgakup Mar 31, 2025
d7388eb
fix: show message no result found
olgakup Mar 31, 2025
82e3340
fix: add account dialog
olgakup Mar 31, 2025
a5a5568
fix: import account dialog
olgakup Mar 31, 2025
0208125
fix: rename account dialog
olgakup Mar 31, 2025
2a9fc47
fix: delete account dialog
olgakup Mar 31, 2025
af83ea9
fix: padding in account scroll
olgakup Mar 31, 2025
f0c379b
devop: fix icon in confirmation screen
olgakup Mar 31, 2025
3ec7eca
fix: qr code tooltip pisition
olgakup Mar 31, 2025
ec1a660
fix: select nft to send dialog
olgakup Mar 31, 2025
962d81e
fix: search nfts
olgakup Mar 31, 2025
0871f4d
devop: do not rennder select nft dialog
olgakup Mar 31, 2025
c159055
fix: fallthrough atributes warning
olgakup Mar 31, 2025
30c1654
fix: tx sent dialog
olgakup Apr 1, 2025
620082e
devop: merge
olgakup Apr 1, 2025
0882b95
fix: add v model back to file
olgakup Apr 1, 2025
5cde200
Merge branch 'devop/pakage-updates' of github.com:enkryptcom/enKrypt …
gamalielhere Apr 1, 2025
4fcbbe1
devop: remove commas from value when parsing
gamalielhere Apr 1, 2025
49a5dbb
fix: display tx verify for hw
olgakup Apr 2, 2025
b65e930
fix: close add account
olgakup Apr 2, 2025
e43ef4e
chore: pass string
gamalielhere Apr 2, 2025
d518e6b
Merge branch 'feat/collapse-networks-menu' of github.com:enkryptcom/e…
gamalielhere Apr 2, 2025
161d748
fix: tx event and padding
olgakup Apr 2, 2025
9fe9c09
devop: remove console
gamalielhere Apr 2, 2025
ff5b9db
Merge branch 'feat/collapse-networks-menu' of github.com:enkryptcom/e…
gamalielhere Apr 2, 2025
95edcf0
devop: merge
olgakup Apr 2, 2025
fa1f4a8
Merge branch 'feat/collapse-networks-menu' of github.com:enkryptcom/e…
gamalielhere Apr 2, 2025
3c157fd
fix: build
gamalielhere Apr 2, 2025
1930f86
fix: build
gamalielhere Apr 2, 2025
b49781c
fix: rename account
olgakup Apr 3, 2025
24dd07a
fix: swap initiated dialog
olgakup Apr 3, 2025
f38d608
fix: swap dialog
olgakup Apr 3, 2025
6141a6a
fix: nan on send page
gamalielhere Apr 3, 2025
050918a
devop: remove formatting causing issues when values are too low
gamalielhere Apr 3, 2025
9c1ea55
fix: handle Nan, zero, etc
gamalielhere Apr 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
39 changes: 39 additions & 0 deletions packages/extension/src/libs/menu-state/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import BrowserStorage from '../common/browser-storage';
import { InternalStorageNamespace } from '@/types/provider';
import { IState, StorageKeys } from './types';

class MenuState {
private storage: BrowserStorage;

constructor() {
this.storage = new BrowserStorage(InternalStorageNamespace.menuState);
}

async setState(state: IState): Promise<void> {
return this.storage.set(StorageKeys.menuState, state);
}

async getState(): Promise<IState> {
const state = this.storage.get(StorageKeys.menuState);
if (!state) {
const newState: IState = {
isExpanded: true
}
return newState
}
return state;
}

async getIsExpanded(): Promise<IState['isExpanded']> {
const state: IState = await this.getState();
return state?.isExpanded ?? true;
}
async setIsExpanded(isExpanded: boolean): Promise<void> {
const state: IState = await this.getState();
const newState: IState = { ...state, isExpanded }
await this.setState(newState);
}

}

export default MenuState;
7 changes: 7 additions & 0 deletions packages/extension/src/libs/menu-state/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export enum StorageKeys {
menuState = 'menu-state-info',
}

export interface IState {
isExpanded: boolean;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import icon from './icons/tbtc.svg';
import icon from './icons/tbtc.webp';
import { NetworkNames } from '@enkryptcom/types';
import {
BitcoinNetwork,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import icon from './icons/btc.svg';
import icon from './icons/btc.webp';
import { NetworkNames } from '@enkryptcom/types';
import {
BitcoinNetwork,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import icon from './icons/doge.svg';
import icon from './icons/doge.webp';
import { NetworkNames } from '@enkryptcom/types';
import {
BitcoinNetwork,
Expand Down
12 changes: 0 additions & 12 deletions packages/extension/src/providers/bitcoin/networks/icons/btc.svg

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 0 additions & 13 deletions packages/extension/src/providers/bitcoin/networks/icons/tbtc.svg

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import icon from './icons/ltc.svg';
import icon from './icons/ltc.webp';
import { NetworkNames } from '@enkryptcom/types';
import {
BitcoinNetwork,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
/>

<nft-select-list
v-show="isOpenSelectNft"
v-if="!isSendToken"
v-model="isOpenSelectNft"
:address="addressFrom"
:network="network"
:selected-nft="paramNFTData"
@close="toggleSelectNft"
@select-nft="selectNFT"
/>

Expand All @@ -80,11 +80,10 @@
/>

<transaction-fee-view
v-model="isOpenSelectFee"
:fees="gasCostValues"
:show-fees="isOpenSelectFee"
:selected="selectedFee"
:is-header="true"
@close-popup="toggleSelectFee"
@gas-type-changed="selectFee"
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@

<send-process
v-if="isProcessing"
v-model="isProcessing"
:is-nft="isNft"
:to-address="txData.toAddress"
:network="network"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
<template>
<div class="nft-select-list-search">
<search-icon />
<input type="text" placeholder="Search NFT" autocomplete="off" />
<input
v-model="model"
type="text"
placeholder="Search NFT"
autocomplete="off"
/>
</div>
</template>

<script setup lang="ts">
import SearchIcon from '@action/icons/common/search.vue';

const model = defineModel<string>();
</script>

<style lang="less" scoped>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
<template>
<div class="nft-select-list">
<div class="nft-select-list__header">
<h3>Select NFT to send</h3>
<a class="nft-select-list__close" @click="emit('close', false)">
<close-icon />
</a>
</div>
<app-dialog v-model="model">
<div class="nft-select-list">
<div class="nft-select-list__header">
<h3>Select NFT to send</h3>
</div>

<nft-select-list-search />
<nft-select-list-search v-model="searchNFT" />

<custom-scrollbar
class="nft-select-list__scroll-area"
:settings="scrollSettings({ suppressScrollX: true })"
>
<nft-select-list-item
v-for="(item, index) in nftList"
:key="index"
:item="item"
@select-nft="emit('selectNft', $event)"
/>
</custom-scrollbar>
</div>
<custom-scrollbar
class="nft-select-list__scroll-area"
:settings="scrollSettings({ suppressScrollX: true })"
>
<nft-select-list-item
v-for="(item, index) in nftList"
:key="index"
:item="item"
@select-nft="emit('selectNft', $event)"
/>
</custom-scrollbar>
</div>
</app-dialog>
</template>

<script setup lang="ts">
import CloseIcon from '@action/icons/common/close-icon.vue';
import NftSelectListItem from './components/nft-select-list-item.vue';
import CustomScrollbar from '@action/components/custom-scrollbar/index.vue';
import NftSelectListSearch from './components/nft-select-list-search.vue';
Expand All @@ -39,7 +37,9 @@ import {
} from '@/types/nft';
import { BitcoinNetwork } from '@/providers/bitcoin/types/bitcoin-network';
import { SolanaNetwork } from '@/providers/solana/types/sol-network';
import AppDialog from '@action/components/app-dialog/index.vue';

const model = defineModel<boolean>();
const props = defineProps({
network: {
type: Object as PropType<EvmNetwork | BitcoinNetwork | SolanaNetwork>,
Expand All @@ -57,9 +57,10 @@ const props = defineProps({

const emit = defineEmits<{
(e: 'selectNft', data: NFTItemWithCollectionName): void;
(e: 'close', val: boolean): void;
}>();

const searchNFT = ref<string>('');

const nftCollections = ref<NFTCollection[]>([]);
const nftList = computed(() => {
const allItems: NFTItemWithCollectionName[] = [];
Expand All @@ -68,6 +69,16 @@ const nftList = computed(() => {
allItems.push({ ...item, ...{ collectionName: col.name } });
});
});
if (searchNFT.value && searchNFT.value !== '') {
return allItems.filter(item => {
return (
item.name.toLowerCase().includes(searchNFT.value.toLowerCase()) ||
item.collectionName
.toLowerCase()
.includes(searchNFT.value.toLowerCase())
);
});
}
return allItems;
});
const updateNFTList = () => {
Expand Down Expand Up @@ -114,18 +125,7 @@ onMounted(() => {
@import '@action/styles/custom-scroll.less';

.nft-select-list {
width: 100%;
background: #ffffff;
position: fixed;
box-shadow:
0px 3px 6px rgba(0, 0, 0, 0.039),
0px 7px 24px rgba(0, 0, 0, 0.19);
border-radius: 12px;
width: 428px;
height: 568px;
left: 356px;
top: 16px;
z-index: 12;

&__header {
position: relative;
Expand All @@ -141,19 +141,6 @@ onMounted(() => {
}
}

&__close {
position: absolute;
top: 8px;
right: 8px;
border-radius: 8px;
cursor: pointer;
font-size: 0;

&:hover {
background: @black007;
}
}

&__scroll-area {
position: relative;
margin: auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
<div class="send-fee-select__value">
<p class="send-fee-select__value-fiat">
Fee:
{{
$filters.parseCurrency($filters.formatFiatValue(fee.fiatValue).value)
}}
{{ $filters.parseCurrency(fee.fiatValue) }}
</p>
<p class="send-fee-select__value-crypto">
{{ $filters.formatFloatingPointValue(fee.nativeValue).value }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

<div class="send-input-amount__fiat">
<switch-arrow-icon />
<span>{{
$filters.parseCurrency($filters.formatFiatValue(fiatEquivalent).value)
}}</span>
<span>{{ $filters.parseCurrency(fiatEquivalent) }}</span>
</div>

<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
<div class="verify-transaction-fee">
<p class="verify-transaction-fee__fiat">
Network fee:
{{
$filters.parseCurrency($filters.formatFiatValue(fee.fiatValue).value)
}}
{{ $filters.parseCurrency(fee.fiatValue) }}
</p>
<p class="verify-transaction-fee__crypto">
{{ $filters.formatFloatingPointValue(fee.nativeValue).value }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ defineProps({
width: 32px;
height: 32px;
margin-right: 12px;
object-fit: contain;
}

&__name {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ const NetworkEndpoints: Record<string, string> = {
[NetworkNames.ProofOfPlayApex]: 'https://explorer.apex.proofofplay.com/',
[NetworkNames.Scroll]: 'https://api.scrollscan.com/',
[NetworkNames.Fraxtal]: 'https://api.fraxscan.com/',
[NetworkNames.Ink]: 'https://explorer.inkonchain.com/',
[NetworkNames.Coti]: 'https://mainnet.cotiscan.io/',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ const supportedNetworks: Record<SupportedNetworkNames, SupportedNetwork> = {
cgPlatform: CoingeckoPlatform.Story,
},
[NetworkNames.Ink]: {
tbName: 'ink',
cgPlatform: CoingeckoPlatform.Ink,
bsEndpoint: true,
},
[NetworkNames.Bera]: {
tbName: 'bera',
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/providers/ethereum/networks/5ire.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import icon from './icons/5ire.svg';
import icon from './icons/5ire.webp';
import wrapActivityHandler from '@/libs/activity-state/wrap-activity-handler';
import { NetworkNames } from '@enkryptcom/types';
import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network';
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/providers/ethereum/networks/aa.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import icon from './icons/aa.svg';
import icon from './icons/aa.webp';
import { NetworkNames } from '@enkryptcom/types';
import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network';
import { EtherscanActivity } from '../libs/activity-handlers';
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/providers/ethereum/networks/aat.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import icon from './icons/aa.svg';
import icon from './icons/aa.webp';
import { NetworkNames } from '@enkryptcom/types';
import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network';
import { EtherscanActivity } from '../libs/activity-handlers';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import icon from './icons/arbitrum-nova.png';
import icon from './icons/arbitrum-nova.webp';
import { CoingeckoPlatform, NetworkNames } from '@enkryptcom/types';
import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network';
import assetsInfoHandler from '@/providers/ethereum/libs/assets-handlers/assetinfo-mew';
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/providers/ethereum/networks/arb.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import icon from './icons/arbitrum.svg';
import icon from './icons/arbitrum.webp';
import { CoingeckoPlatform, NetworkNames } from '@enkryptcom/types';
import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network';
import { EtherscanActivity } from '../libs/activity-handlers';
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/providers/ethereum/networks/astr.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import icon from './icons/astr.png';
import icon from './icons/astr.webp';
import { CoingeckoPlatform, NetworkNames } from '@enkryptcom/types';
import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network';
import { EtherscanActivity } from '../libs/activity-handlers';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import icon from './icons/aurora.png';
import icon from './icons/aurora.webp';
import { CoingeckoPlatform, NetworkNames } from '@enkryptcom/types';
import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network';
import wrapActivityHandler from '@/libs/activity-state/wrap-activity-handler';
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/providers/ethereum/networks/avax.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import icon from './icons/avax.svg';
import icon from './icons/avax.webp';
import { CoingeckoPlatform, NetworkNames } from '@enkryptcom/types';
import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network';
import { EtherscanActivity } from '../libs/activity-handlers';
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/providers/ethereum/networks/base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import icon from './icons/base.svg';
import icon from './icons/base.webp';
import { CoingeckoPlatform, NetworkNames } from '@enkryptcom/types';
import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network';
import shNFTHandler from '@/libs/nft-handlers/simplehash';
Expand Down
Loading
Loading