Skip to content

Commit

Permalink
Merge pull request #216 from RunOnFlux/evm
Browse files Browse the repository at this point in the history
v1.6.0 EVM
  • Loading branch information
TheTrunk authored Jul 18, 2024
2 parents 0283ed3 + 24452c1 commit e8b90e2
Show file tree
Hide file tree
Showing 58 changed files with 4,668 additions and 918 deletions.
34 changes: 19 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ssp-wallet",
"description": "Secure. Simple. Powerful.",
"private": true,
"version": "1.5.0",
"version": "1.6.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -12,14 +12,16 @@
"postinstall": "patch-package"
},
"dependencies": {
"@metamask/browser-passworder": "~5.0.0",
"@alchemy/aa-core": "~3.18.2",
"@metamask/browser-passworder": "~5.0.1",
"@noble/hashes": "~1.4.0",
"@reduxjs/toolkit": "~2.2.5",
"@reduxjs/toolkit": "~2.2.6",
"@runonflux/aa-schnorr-multisig-sdk": "~1.0.3",
"@runonflux/flux-sdk": "~1.0.2",
"@runonflux/utxo-lib": "~1.0.0",
"@scure/bip32": "~1.4.0",
"@scure/bip39": "~1.3.0",
"antd": "~5.18.0",
"antd": "~5.19.1",
"assert": "~2.1.0",
"axios": "~1.7.2",
"bchaddrjs": "~0.5.2",
Expand All @@ -30,7 +32,7 @@
"events": "~3.3.0",
"i18next": "~23.11.5",
"localforage": "~1.10.0",
"lru-cache": "~10.2.2",
"lru-cache": "~11.0.0",
"patch-package": "~8.0.0",
"postinstall-postinstall": "~2.1.0",
"process": "~0.11.10",
Expand All @@ -39,30 +41,32 @@
"react-dom": "~18.3.1",
"react-i18next": "~14.1.2",
"react-redux": "~9.1.2",
"react-router-dom": "~6.23.1",
"react-router-dom": "~6.24.1",
"react-secure-storage": "~1.3.2",
"socket.io-client": "~4.7.5",
"stream-browserify": "~3.0.0",
"util": "~0.12.5"
"util": "~0.12.5",
"viem": "~2.17.3"
},
"devDependencies": {
"@types/bchaddrjs": "~0.4.3",
"@types/chrome": "~0.0.268",
"@types/node": "~20.14.1",
"@types/node": "~20.14.10",
"@types/react": "~18.3.3",
"@types/react-dom": "~18.3.0",
"@types/react-redux": "~7.1.33",
"@types/react-router-dom": "~5.3.3",
"@typescript-eslint/eslint-plugin": "~7.12.0",
"@typescript-eslint/parser": "~7.12.0",
"@typescript-eslint/eslint-plugin": "~7.16.0",
"@typescript-eslint/parser": "~7.16.0",
"@vitejs/plugin-react-swc": "~3.7.0",
"eslint": "~8.57.0",
"eslint-plugin-react": "~7.34.2",
"eslint-plugin-react": "~7.34.3",
"eslint-plugin-react-hooks": "~4.6.2",
"eslint-plugin-react-refresh": "~0.4.7",
"prettier": "~3.3.0",
"typescript": "~5.4.5",
"vite": "~5.2.12"
"eslint-plugin-react-refresh": "~0.4.8",
"prettier": "~3.3.2",
"tsx": "~4.16.2",
"typescript": "~5.5.3",
"vite": "~5.3.3"
},
"engines": {
"node": ">=20"
Expand Down
33 changes: 33 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { useState } from 'react';
import { RouterProvider } from 'react-router-dom';
import { ConfigProvider, theme } from 'antd';
import router from './router';

function App() {
const { defaultAlgorithm, darkAlgorithm } = theme;
const darkModePreference = window.matchMedia('(prefers-color-scheme: dark)');
darkModePreference.addEventListener('change', (e) => changeTheme(e.matches));
const [themeStyle, setThemeStyle] = useState(
darkModePreference.matches ? 'dark' : 'light',
);

const changeTheme = (isDark: boolean) => {
if (isDark) {
setThemeStyle('dark');
} else {
setThemeStyle('light');
}
};

return (
<ConfigProvider
theme={{
algorithm: themeStyle === 'dark' ? darkAlgorithm : defaultAlgorithm,
}}
>
<RouterProvider router={router} />
</ConfigProvider>
);
}

export default App;
19 changes: 19 additions & 0 deletions src/assets/eth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
132 changes: 132 additions & 0 deletions src/assets/teth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions src/assets/usdc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/assets/usdt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/backends.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
declare module '@storage/backends' {
interface Backend {
node: string;
api?: string;
explorer?: string;
}
type backends = Record<string, Backend>;
let backends: () => backends;
Expand Down
18 changes: 18 additions & 0 deletions src/blockchains.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
declare module '@storage/blockchains' {
export interface Token {
contract: string;
name: string;
symbol: string;
decimals: number;
logo: string;
}
interface Blockchain {
id: string;
libid: string;
name: string;
symbol: string;
decimals: number;
node: string;
api: string;
slip: number;
scriptType: string;
messagePrefix: string;
Expand All @@ -30,6 +38,16 @@ declare module '@storage/blockchains' {
cashaddr: string;
txExpiryHeight: number;
hashType: number;
// evm
chainType: string;
accountSalt: string;
factorySalt: string;
factoryAddress: string;
entrypointAddress: string;
baseFee: number;
priorityFee: number;
gasLimit: number;
tokens: Token[];
}
type blockchains = Record<string, Blockchain>;
let blockchains: blockchains;
Expand Down
Loading

0 comments on commit e8b90e2

Please sign in to comment.