Skip to content

Commit c1d9b91

Browse files
committed
chore: remove ledger changes
2 parents c38a9ad + 519816a commit c1d9b91

63 files changed

Lines changed: 3673 additions & 3232 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.yarn/releases/yarn-4.13.0.cjs

Lines changed: 940 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-4.5.1.cjs

Lines changed: 0 additions & 934 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ nodeLinker: node-modules
88

99
npmRegistryServer: "https://registry.yarnpkg.com/"
1010

11-
yarnPath: .yarn/releases/yarn-4.5.1.cjs
11+
yarnPath: .yarn/releases/yarn-4.13.0.cjs
12+
13+
npmMinimalAgeGate: "5d"

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@
3232
"prepare": "husky"
3333
},
3434
"devDependencies": {
35-
"@commitlint/cli": "^20.4.1",
36-
"@commitlint/config-conventional": "^20.4.1",
37-
"@swc/core": "^1.15.11",
35+
"@commitlint/cli": "^20.5.0",
36+
"@commitlint/config-conventional": "^20.5.0",
37+
"@swc/core": "^1.15.21",
3838
"concurrently": "^9.2.1",
3939
"husky": "^9.1.7",
4040
"node-notifier": "^10.0.1",
41-
"nodemon": "^3.1.11",
41+
"nodemon": "^3.1.14",
4242
"ultra-runner": "^3.10.5",
43-
"vite-plugin-node-polyfills": "0.25.0"
43+
"vite-plugin-node-polyfills": "0.26.0"
4444
},
4545
"resolutions": {
4646
"@zondax/ledger-cosmos-js/vue": "^3.5.12",

packages/extension-bridge/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
"webextension-polyfill": "^0.12.0"
4545
},
4646
"devDependencies": {
47-
"@types/node": "^22.19.11",
48-
"@types/webextension-polyfill": "^0.12.4",
49-
"@typescript-eslint/eslint-plugin": "^8.56.0",
50-
"@typescript-eslint/parser": "^8.56.0",
47+
"@types/node": "^22.19.15",
48+
"@types/webextension-polyfill": "^0.12.5",
49+
"@typescript-eslint/eslint-plugin": "^8.58.0",
50+
"@typescript-eslint/parser": "^8.58.0",
5151
"bumpp": "^10.4.1",
52-
"eslint": "^9.39.2",
52+
"eslint": "^9.39.4",
5353
"eslint-config-airbnb-base": "^15.0.0",
5454
"eslint-config-prettier": "^10.1.8",
5555
"eslint-import-resolver-alias": "^1.1.2",
@@ -59,8 +59,8 @@
5959
"ts-node": "^10.9.2",
6060
"tsconfig-paths": "^4.2.0",
6161
"tsup": "^8.5.1",
62-
"type-fest": "^5.4.4",
62+
"type-fest": "^5.5.0",
6363
"typescript": "^5.9.3",
64-
"typescript-eslint": "8.56.0"
64+
"typescript-eslint": "8.58.0"
6565
}
6666
}

packages/extension/package.json

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@enkryptcom/extension",
3-
"version": "2.16.0",
3+
"version": "2.17.0",
44
"private": true,
55
"type": "module",
66
"scripts": {
@@ -23,7 +23,7 @@
2323
"watch:firefox": "yarn prebuild && cross-env BROWSER='firefox' vite"
2424
},
2525
"dependencies": {
26-
"@amplitude/analytics-browser": "^2.35.0",
26+
"@amplitude/analytics-browser": "^2.38.1",
2727
"@enkryptcom/extension-bridge": "workspace:^",
2828
"@enkryptcom/hw-wallets": "workspace:^",
2929
"@enkryptcom/keyring": "workspace:^",
@@ -38,20 +38,20 @@
3838
"@ethereumjs/wallet": "^2.0.4",
3939
"@kadena/client": "^1.18.3",
4040
"@kadena/pactjs-cli": "^1.18.3",
41-
"@ledgerhq/hw-transport-webusb": "^6.30.0",
41+
"@ledgerhq/hw-transport-webusb": "^6.33.0",
4242
"@massalabs/massa-web3": "^5.3.0",
4343
"@metamask/eth-sig-util": "^8.2.0",
4444
"@metaplex-foundation/mpl-bubblegum": "^5.0.2",
4545
"@metaplex-foundation/umi": "^1.5.1",
4646
"@metaplex-foundation/umi-bundle-defaults": "^1.5.1",
47-
"@polkadot/api": "^16.5.4",
48-
"@polkadot/extension-inject": "^0.62.6",
49-
"@polkadot/keyring": "^14.0.1",
50-
"@polkadot/rpc-provider": "^16.5.4",
51-
"@polkadot/types": "^16.5.4",
52-
"@polkadot/types-known": "^16.5.4",
53-
"@polkadot/ui-shared": "^3.16.4",
54-
"@polkadot/util": "^14.0.1",
47+
"@polkadot/api": "^16.5.6",
48+
"@polkadot/extension-inject": "^0.63.1",
49+
"@polkadot/keyring": "^14.0.3",
50+
"@polkadot/rpc-provider": "^16.5.6",
51+
"@polkadot/types": "^16.5.6",
52+
"@polkadot/types-known": "^16.5.6",
53+
"@polkadot/ui-shared": "^3.16.7",
54+
"@polkadot/util": "^14.0.3",
5555
"@polkadot/wasm-crypto": "^7.5.4",
5656
"@solana-developers/helpers": "2.8.0",
5757
"@solana/spl-token": "^0.4.14",
@@ -69,7 +69,7 @@
6969
"ethereumjs-abi": "^0.6.8",
7070
"eventemitter3": "^5.0.4",
7171
"jdenticon": "^3.3.0",
72-
"lodash": "^4.17.23",
72+
"lodash": "^4.18.0",
7373
"memoize-one": "^6.0.0",
7474
"moment": "^2.30.1",
7575
"nanoevents": "^9.1.0",
@@ -79,7 +79,7 @@
7979
"switch-ts": "^2.0.0",
8080
"url-parse": "^1.5.10",
8181
"uuid": "^13.0.0",
82-
"vue": "^3.5.28",
82+
"vue": "^3.5.31",
8383
"vue-echarts": "8.0.1",
8484
"vue-router": "^4.6.4",
8585
"vue3-lottie": "^3.3.1",
@@ -90,8 +90,8 @@
9090
"zxcvbn": "^4.4.2"
9191
},
9292
"devDependencies": {
93-
"@crxjs/vite-plugin": "^2.3.0",
94-
"@rollup/plugin-commonjs": "^29.0.0",
93+
"@crxjs/vite-plugin": "^2.4.0",
94+
"@rollup/plugin-commonjs": "^29.0.2",
9595
"@rollup/plugin-inject": "^5.0.5",
9696
"@rollup/plugin-json": "^6.1.0",
9797
"@rollup/plugin-node-resolve": "^16.0.3",
@@ -100,46 +100,46 @@
100100
"@rollup/plugin-typescript": "^12.3.0",
101101
"@tsconfig/node20": "^20.1.9",
102102
"@types/bs58": "^5.0.0",
103-
"@types/chrome": "^0.1.36",
103+
"@types/chrome": "^0.1.38",
104104
"@types/ethereumjs-abi": "^0.6.5",
105105
"@types/events": "^3.0.3",
106106
"@types/fs-extra": "^11.0.4",
107107
"@types/less": "^3.0.8",
108-
"@types/lodash": "^4.17.23",
109-
"@types/node": "^22.19.11",
108+
"@types/lodash": "^4.17.24",
109+
"@types/node": "^22.19.15",
110110
"@types/semver": "^7.7.1",
111111
"@types/url-parse": "^1.4.11",
112112
"@types/utf-8-validate": "^5.0.2",
113113
"@types/uuid": "^11.0.0",
114114
"@types/wif": "^2.0.5",
115115
"@types/zxcvbn": "^4.4.5",
116-
"@vitejs/plugin-vue": "^6.0.4",
116+
"@vitejs/plugin-vue": "^6.0.5",
117117
"@vue/eslint-config-prettier": "^10.2.0",
118118
"@vue/eslint-config-typescript": "^14.7.0",
119119
"@vue/tsconfig": "^0.8.1",
120120
"@vueuse/core": "^14.2.1",
121121
"cross-env": "^10.1.0",
122-
"eslint": "^9.39.2",
122+
"eslint": "^9.39.4",
123123
"eslint-plugin-vue": "^10.8.0",
124-
"fs-extra": "^11.3.3",
125-
"jsdom": "^27.4.0",
126-
"less": "^4.5.1",
127-
"less-loader": "^12.3.1",
124+
"fs-extra": "^11.3.4",
125+
"jsdom": "^29.0.1",
126+
"less": "^4.6.4",
127+
"less-loader": "^12.3.2",
128128
"npm-run-all2": "^8.0.4",
129129
"prettier": "^3.8.1",
130130
"rimraf": "^6.1.3",
131-
"rollup": "^4.57.1",
132-
"rollup-plugin-visualizer": "^6.0.5",
131+
"rollup": "^4.60.1",
132+
"rollup-plugin-visualizer": "^6.0.11",
133133
"semver": "^7.7.4",
134-
"systeminformation": "^5.31.1",
134+
"systeminformation": "^5.31.5",
135135
"tsup": "^8.5.1",
136136
"typescript": "~5.9.3",
137137
"url": "^0.11.4",
138138
"vite": "^7.3.1",
139-
"vite-plugin-node-polyfills": "0.25.0",
139+
"vite-plugin-node-polyfills": "0.26.0",
140140
"vite-tsconfig-paths": "^6.1.1",
141-
"vitest": "^4.0.18",
142-
"vue-tsc": "^3.2.4",
141+
"vitest": "^4.1.2",
142+
"vue-tsc": "^3.2.6",
143143
"webextension-polyfill": "^0.12.0"
144144
},
145145
"installConfig": {

packages/extension/src/libs/dapp-list/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ const lists: Partial<Record<NetworkNames, string>> = {
3333
'https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/bifrost.json',
3434
[NetworkNames.BifrostKusama]:
3535
'https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/bifrost.json',
36-
[NetworkNames.Edgeware]:
37-
'https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/edg.json',
3836
[NetworkNames.ZkSync]:
3937
'https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/zksync.json',
4038
[NetworkNames.Rootstock]:
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
import { NFTCollection, NFTItem, NFTType } from '@/types/nft';
2+
import { BlockscoutNFTItem } from '@/libs/nft-handlers/types/blockscout';
3+
import { NodeType } from '@/types/provider';
4+
import Networks from '@/providers/ethereum/networks';
5+
import cacheFetch from '../cache-fetch';
6+
import { ethers, Contract } from 'ethers';
7+
const ROOTSTOCK_RPC_NODE = 'https://public-node.rsk.co';
8+
const ERC721_METADATA_ABI = [
9+
'function contractURI() view returns (string)'
10+
];
11+
const BLOCKSCOUT_ENDPOINT = 'https://rootstock.blockscout.com/api/v2/addresses';
12+
const IPFS_ENDPOINT = 'https://ipfs.io/ipfs';
13+
const CACHE_TTL = 60 * 1000;
14+
const getAssetURL = (uri: string) => {
15+
if (uri && uri.startsWith('ipfs://')) {
16+
return `${IPFS_ENDPOINT}/${uri.slice(7)}`;
17+
}
18+
19+
return uri;
20+
};
21+
const fetchNftCollectionDescription = async (network: NodeType, contractAddress: string): Promise<string | null> => {
22+
try {
23+
const supportedNetworks = [Networks.rootstock.name];
24+
if (!supportedNetworks.includes(network.name)) {
25+
return null;
26+
}
27+
const provider = new ethers.providers.JsonRpcProvider(ROOTSTOCK_RPC_NODE);
28+
const contract = new Contract(contractAddress.toLowerCase(), ERC721_METADATA_ABI, provider);
29+
const uri = await contract.contractURI();
30+
const httpUrl = getAssetURL(uri);
31+
const response = await fetch(httpUrl);
32+
if (!response.ok) {
33+
return null;
34+
}
35+
const metadata = await response.json();
36+
return metadata.description;
37+
} catch {
38+
return null;
39+
}
40+
}
41+
export default async (
42+
network: NodeType,
43+
address: string,
44+
): Promise<NFTCollection[]> => {
45+
const supportedNetworks = [Networks.rootstock.name];
46+
if (!supportedNetworks.includes(network.name))
47+
throw new Error('Blockscout: network not supported');
48+
const fetchAll = (): Promise<BlockscoutNFTItem[]> => {
49+
const query = `${BLOCKSCOUT_ENDPOINT}/${address}/nft/collections?type=ERC-721`;
50+
return cacheFetch({ url: query }, CACHE_TTL).then(json => {
51+
return json.items as BlockscoutNFTItem[];
52+
});
53+
};
54+
const allItems = await fetchAll();
55+
if (!allItems || !allItems.length) return [];
56+
return Promise.all(allItems.map(async item => {
57+
const ret: NFTCollection = {
58+
name: item.token.name ?? 'Unnamed token',
59+
description: await fetchNftCollectionDescription(network, item.token.address_hash),
60+
image: item.token?.icon_url,
61+
contract: item.token.address_hash,
62+
items: item.token_instances.map(asset => {
63+
const retAsset: NFTItem = {
64+
contract: item.token.address_hash,
65+
id: asset.id,
66+
image: getAssetURL(asset.media_url),
67+
name: asset?.metadata?.name ?? 'Unnamed NFT asset',
68+
url: `https://rootstock.blockscout.com/token/${item.token.address_hash}/instance/${asset.id}`,
69+
type: NFTType.ERC721,
70+
};
71+
return retAsset;
72+
}),
73+
};
74+
return ret;
75+
}));
76+
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
export type BlockscoutNFTItem = {
2+
amount: string;
3+
token: Token;
4+
token_instances: TokenInstance[];
5+
};
6+
7+
export type Token = {
8+
address_hash: string;
9+
holders_count: string;
10+
icon_url: string;
11+
name: string | null;
12+
type: string;
13+
};
14+
15+
export type TokenInstance = {
16+
id: string;
17+
image_url: string;
18+
media_url: string;
19+
metadata: TokenMetadata;
20+
owner: string;
21+
token: Token;
22+
token_type: string;
23+
};
24+
25+
export type TokenMetadata = {
26+
attributes?: Attribute[];
27+
background_color?: string;
28+
description?: string;
29+
external_url?: string;
30+
image_data?: string;
31+
name: string;
32+
image?: string;
33+
};
34+
35+
export type Attribute = {
36+
trait_type: string;
37+
value: string | number;
38+
display_type?: string;
39+
};

packages/extension/src/providers/ethereum/libs/activity-handlers/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ import EtherscanActivity from './providers/etherscan';
33
import OkcActivity from './providers/okc';
44
import TomoScan from './providers/tomoscan';
55
import OntEVMActivity from './providers/ont-evm';
6-
import TelosActivity from './providers/telos';
76
import RoutescanActivity from './providers/routescan';
87
export {
98
RivetActivity,
109
EtherscanActivity,
1110
OkcActivity,
1211
OntEVMActivity,
1312
TomoScan,
14-
TelosActivity,
1513
RoutescanActivity,
1614
};

0 commit comments

Comments
 (0)