diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index c54eabc4..00000000
--- a/.eslintignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.eslintrc.cjs
-vite.config.ts
-index.html
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
deleted file mode 100644
index e24e3622..00000000
--- a/.eslintrc.cjs
+++ /dev/null
@@ -1,50 +0,0 @@
-module.exports = {
- root: true,
- env: { browser: true, es2020: true },
- extends: [
- 'eslint:recommended',
- 'plugin:react/recommended',
- 'plugin:react/jsx-runtime',
- 'plugin:@typescript-eslint/recommended-type-checked',
- 'plugin:@typescript-eslint/stylistic-type-checked',
- 'plugin:react-hooks/recommended',
- ],
- globals: {
- chrome: true,
- },
- parser: '@typescript-eslint/parser',
- parserOptions: {
- ecmaVersion: 'latest',
- sourceType: 'module',
- project: true,
- tsconfigRootDir: __dirname,
- },
- plugins: ['react-refresh'],
- rules: {
- 'react-refresh/only-export-components': [
- 'warn',
- { allowConstantExport: true },
- ],
- '@typescript-eslint/no-non-null-assertion': 'off',
- 'react-hooks/exhaustive-deps': 'off',
- quotes: ['error', 'single'],
- 'object-curly-spacing': ['error', 'always'],
- 'array-bracket-spacing': ['error', 'never'],
- 'react/require-default-props': ['error'],
- 'react/default-props-match-prop-types': ['error'],
- 'react/sort-prop-types': ['error'],
- },
- "overrides": [
- {
- "files": ["*.js", "*.jsx"],
- "rules": {
- "@typescript-eslint/no-unused-vars": "off",
- "@typescript-eslint/no-unsafe-return": "off",
- "@typescript-eslint/no-unsafe-call": "off",
- "@typescript-eslint/no-unsafe-assignment": "off",
- "@typescript-eslint/no-unsafe-member-access": "off",
- "@typescript-eslint/no-misused-promises": "off",
- }
- }
- ]
-}
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 00000000..0708bd5d
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,31 @@
+import globals from 'globals';
+import pluginJs from '@eslint/js';
+import tseslint from 'typescript-eslint';
+import pluginReact from 'eslint-plugin-react';
+import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
+import reactRefresh from 'eslint-plugin-react-refresh';
+import reactHooks from 'eslint-plugin-react-hooks';
+
+export default [
+ eslintPluginPrettierRecommended,
+ pluginJs.configs.recommended,
+ ...tseslint.configs.recommended,
+ pluginReact.configs.flat.recommended,
+ {
+ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
+ languageOptions: {
+ globals: {
+ ...globals.browser,
+ ...globals.node,
+ ...globals.es2020,
+ },
+ },
+ plugins: {
+ reactRefresh,
+ reactHooks,
+ },
+ rules: {
+ 'react/react-in-jsx-scope': 'off',
+ },
+ },
+];
diff --git a/index.html b/index.html
index 552f19b9..220572a0 100644
--- a/index.html
+++ b/index.html
@@ -1,4 +1,4 @@
-
+
diff --git a/package.json b/package.json
index 48ad2f70..7d8ece58 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,9 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
- "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
+ "lint": "eslint ./src ./public",
+ "lint:fix": "eslint ./src ./public --fix",
+ "type-check": "tsc",
"preview": "vite preview",
"postinstall": "patch-package"
},
@@ -15,13 +17,13 @@
"@alchemy/aa-core": "~3.18.2",
"@metamask/browser-passworder": "~5.0.1",
"@noble/hashes": "~1.4.0",
- "@reduxjs/toolkit": "~2.2.6",
+ "@reduxjs/toolkit": "~2.2.7",
"@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.19.3",
+ "antd": "~5.19.4",
"assert": "~2.1.0",
"axios": "~1.7.2",
"bchaddrjs": "~0.5.2",
@@ -39,34 +41,39 @@
"react": "~18.3.1",
"react-countdown-circle-timer": "~3.2.1",
"react-dom": "~18.3.1",
- "react-i18next": "~14.1.2",
+ "react-i18next": "~15.0.0",
"react-redux": "~9.1.2",
"react-router-dom": "~6.25.1",
"react-secure-storage": "~1.3.2",
"socket.io-client": "~4.7.5",
"stream-browserify": "~3.0.0",
"util": "~0.12.5",
- "viem": "~2.17.3"
+ "viem": "~2.18.6"
},
"devDependencies": {
+ "@eslint/js": "~9.8.0",
"@types/bchaddrjs": "~0.4.3",
"@types/chrome": "~0.0.269",
- "@types/node": "~20.14.12",
+ "@types/node": "~22.0.0",
"@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.17.0",
- "@typescript-eslint/parser": "~7.17.0",
+ "@typescript-eslint/eslint-plugin": "~7.18.0",
+ "@typescript-eslint/parser": "~7.18.0",
"@vitejs/plugin-react-swc": "~3.7.0",
- "eslint": "~8.57.0",
+ "eslint": "~9.8.0",
+ "eslint-config-prettier": "~9.1.0",
+ "eslint-plugin-prettier": "~5.2.1",
"eslint-plugin-react": "~7.35.0",
"eslint-plugin-react-hooks": "~4.6.2",
"eslint-plugin-react-refresh": "~0.4.9",
+ "globals": "~15.8.0",
"prettier": "~3.3.3",
- "tsx": "~4.16.2",
+ "tsx": "~4.16.3",
"typescript": "~5.5.4",
- "vite": "~5.3.4"
+ "typescript-eslint": "~7.18.0",
+ "vite": "~5.3.5"
},
"engines": {
"node": ">=20"
diff --git a/public/scripts/background.js b/public/scripts/background.js
index c5c80f9d..ad86c436 100644
--- a/public/scripts/background.js
+++ b/public/scripts/background.js
@@ -1,3 +1,4 @@
+/*global chrome*/
// https://github.com/MetaMask/metamask-extension/blob/develop/app/scripts/app-init.js
/*
@@ -11,7 +12,6 @@ let popupId;
const registerInPageContentScript = async () => {
try {
- // eslint-disable-next-line no-undef
await chrome.scripting.registerContentScripts([
{
id: 'sspinpage',
@@ -29,10 +29,7 @@ const registerInPageContentScript = async () => {
* 2. await chrome.scripting.getRegisteredContentScripts() to check for an existing
* inpage script before registering - The provider is not loaded on time.
*/
- console.warn(
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
- `Dropped attempt to register inpage content script. ${err}`,
- );
+ console.warn(`Dropped attempt to register inpage content script. ${err}`);
}
};
@@ -46,9 +43,9 @@ async function getAllWindows() {
function getPopupIn(windows) {
return windows
? windows.find((win) => {
- // Returns notification popup
- return win && win.type === 'popup' && win.id === popupId;
- })
+ // Returns notification popup
+ return win && win.type === 'popup' && win.id === popupId;
+ })
: null;
}
@@ -58,7 +55,6 @@ async function getPopup() {
}
async function focusWindow(windowId, options = { focused: true }) {
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
await chrome.windows.update(windowId, options);
}
@@ -89,10 +85,7 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
const lastFocused = await chrome.windows.getLastFocused();
if (lastFocused) {
top = lastFocused.top + 80;
- left = Math.max(
- lastFocused.left + (lastFocused.width - 420 - 10),
- 10,
- );
+ left = Math.max(lastFocused.left + (lastFocused.width - 420 - 10), 10);
}
const popup = await getPopup(popupId);
let timeout = 1000;
@@ -112,12 +105,12 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
width: 420,
height: 620,
};
- const newPopup = await chrome.windows
- .create(options)
+ const newPopup = await chrome.windows.create(options);
popupId = newPopup.id;
}
setTimeout(() => {
- void chrome.runtime.sendMessage({ // send new message to poup. We do not await a response. Instead we listen for a new message from popup
+ void chrome.runtime.sendMessage({
+ // send new message to poup. We do not await a response. Instead we listen for a new message from popup
origin: 'ssp-background',
data: request,
// data: {
diff --git a/public/scripts/contentscript.js b/public/scripts/contentscript.js
index aa7216b5..c590e800 100644
--- a/public/scripts/contentscript.js
+++ b/public/scripts/contentscript.js
@@ -10,10 +10,14 @@ async function request(details) {
}
}
-window.addEventListener('fromPageEvent', async function (event) {
- // console.log(event)
- const result = await request(event.detail);
- // console.log(result);
- const eventB = new CustomEvent('fromContentScript', { detail: result });
- window.dispatchEvent(eventB);
-}, false);
+window.addEventListener(
+ 'fromPageEvent',
+ async function (event) {
+ // console.log(event)
+ const result = await request(event.detail);
+ // console.log(result);
+ const eventB = new CustomEvent('fromContentScript', { detail: result });
+ window.dispatchEvent(eventB);
+ },
+ false,
+);
diff --git a/public/scripts/inpage.js b/public/scripts/inpage.js
index 8304ef5e..8adea532 100644
--- a/public/scripts/inpage.js
+++ b/public/scripts/inpage.js
@@ -5,6 +5,7 @@ async function request(method, params) {
};
const event = new CustomEvent('fromPageEvent', { detail: message });
window.dispatchEvent(event);
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
const response = await new Promise((resolve, reject) => {
window.addEventListener(
'fromContentScript',
diff --git a/src/components/AddressContainer/AddressContainer.tsx b/src/components/AddressContainer/AddressContainer.tsx
index bcc1e7d5..b72548ef 100644
--- a/src/components/AddressContainer/AddressContainer.tsx
+++ b/src/components/AddressContainer/AddressContainer.tsx
@@ -4,13 +4,21 @@ const { Paragraph, Text } = Typography;
function AddressContainer() {
const { activeChain } = useAppSelector((state) => state.sspState);
- const { wallets, walletInUse } = useAppSelector((state) => state[activeChain]);
+ const { wallets, walletInUse } = useAppSelector(
+ (state) => state[activeChain],
+ );
return (
<>
-
+
- {wallets[walletInUse].address.substring(0, 7)}...{wallets[walletInUse].address.substring(wallets[walletInUse].address.length - 6)}
+ {wallets[walletInUse].address.substring(0, 7)}...
+ {wallets[walletInUse].address.substring(
+ wallets[walletInUse].address.length - 6,
+ )}
>
diff --git a/src/components/Contacts/ContactsTable.tsx b/src/components/Contacts/ContactsTable.tsx
index 0e2d3f75..56282633 100644
--- a/src/components/Contacts/ContactsTable.tsx
+++ b/src/components/Contacts/ContactsTable.tsx
@@ -65,7 +65,7 @@ function ContactsTable() {
// on chain change and on load, sort contacts and set it
useEffect(() => {
console.log(contacts[activeChain]);
- const contactsCopy = [...contacts[activeChain]] || [];
+ const contactsCopy = [...contacts[activeChain]];
const sortedContacts = contactsCopy.sort((a, b) => {
if (a.name > b.name) return 1;
else if (a.name < b.name) return -1;
diff --git a/src/components/Contacts/ManageContact.tsx b/src/components/Contacts/ManageContact.tsx
index 83424022..755c588f 100644
--- a/src/components/Contacts/ManageContact.tsx
+++ b/src/components/Contacts/ManageContact.tsx
@@ -92,7 +92,11 @@ function ManageContact(props: {
<>
{contextHolder}
-1 ? t('home:contacts.edit_contact') : t('home:contacts.add_contact')}
+ title={
+ editedContact.id > -1
+ ? t('home:contacts.edit_contact')
+ : t('home:contacts.add_contact')
+ }
open={true}
onCancel={handleNotOk}
style={{ textAlign: 'center', top: 60, width: 200 }}
diff --git a/src/components/Headerbar/Headerbar.tsx b/src/components/Headerbar/Headerbar.tsx
index 8af11d44..0090477a 100644
--- a/src/components/Headerbar/Headerbar.tsx
+++ b/src/components/Headerbar/Headerbar.tsx
@@ -23,7 +23,10 @@ function Headerbar({ headerTitle, navigateTo }: Props) {
style={{ cursor: 'pointer' }}
/>
-
+
{headerTitle}
diff --git a/src/components/Key/Key.tsx b/src/components/Key/Key.tsx
index cf7e710c..b873f7fb 100644
--- a/src/components/Key/Key.tsx
+++ b/src/components/Key/Key.tsx
@@ -222,7 +222,8 @@ function Key(props: { synchronised: (status: boolean) => void }) {
void (async function () {
await localForage.setItem('activeChain', identityChain);
})();
- setTimeout(() => { // timeout as we need to wait for activeChain to be switched back
+ setTimeout(() => {
+ // timeout as we need to wait for activeChain to be switched back
setIsModalKeyOpen(false);
synchronised(true);
}, 100);
diff --git a/src/components/LanguageSelector/LanguageSelector.tsx b/src/components/LanguageSelector/LanguageSelector.tsx
index 06c23544..717cc6c2 100644
--- a/src/components/LanguageSelector/LanguageSelector.tsx
+++ b/src/components/LanguageSelector/LanguageSelector.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable @typescript-eslint/no-misused-promises */
import { Select } from 'antd';
import { useTranslation } from 'react-i18next';
import { useState } from 'react';
diff --git a/src/components/Navigation/Navigation.tsx b/src/components/Navigation/Navigation.tsx
index 6cf53a0c..80fed93e 100644
--- a/src/components/Navigation/Navigation.tsx
+++ b/src/components/Navigation/Navigation.tsx
@@ -24,7 +24,12 @@ function Navigation() {
shape="round"
icon={}
size={'large'}
- onClick={() => navigate(blockchainConfig.chainType === 'evm' ? '/sendevm' : '/send', { state: { receiver: '' } })}
+ onClick={() =>
+ navigate(
+ blockchainConfig.chainType === 'evm' ? '/sendevm' : '/send',
+ { state: { receiver: '' } },
+ )
+ }
>
{t('home:navigation.send')}
diff --git a/src/components/NetworkFeeController/NetworkFeeController.tsx b/src/components/NetworkFeeController/NetworkFeeController.tsx
index 656bd5bb..d84e0ea7 100644
--- a/src/components/NetworkFeeController/NetworkFeeController.tsx
+++ b/src/components/NetworkFeeController/NetworkFeeController.tsx
@@ -16,12 +16,9 @@ function NetworkFee() {
if (globalThis.refreshIntervalNetworkFee) {
clearInterval(globalThis.refreshIntervalNetworkFee);
}
- globalThis.refreshIntervalNetworkFee = setInterval(
- () => {
- obtainNetworkFees();
- },
- 15 * 1000,
- );
+ globalThis.refreshIntervalNetworkFee = setInterval(() => {
+ obtainNetworkFees();
+ }, 15 * 1000);
return () => {
if (globalThis.refreshIntervalNetworkFee) {
clearInterval(globalThis.refreshIntervalNetworkFee);
diff --git a/src/components/Nodes/Nodes.tsx b/src/components/Nodes/Nodes.tsx
index fd72868d..53f5e43a 100644
--- a/src/components/Nodes/Nodes.tsx
+++ b/src/components/Nodes/Nodes.tsx
@@ -42,7 +42,7 @@ function Nodes() {
const myNodes = wallets[walletInUse].nodes ?? [];
const [nodeIdentityPK, setNodeIdentityPK] = useState('');
const [collateralPrivKey, setCollateralPrivKey] = useState('');
- const [collateralPublicKey, setCollateralPublicKey] = useState('')
+ const [collateralPublicKey, setCollateralPublicKey] = useState('');
const [messageApi, contextHolder] = message.useMessage();
const displayMessage = (type: NoticeType, content: string) => {
void messageApi.open({
@@ -240,7 +240,12 @@ function Nodes() {
return (
{contextHolder}
-
+
{
- if (a.name > b.name) return 1;
- else if (a.name < b.name) return -1;
- else return 0;
- },
- );
+ const sortedNodesByName = parsedNodes.sort((a, b) => {
+ if (a.name > b.name) return 1;
+ else if (a.name < b.name) return -1;
+ else return 0;
+ });
const blockchainConfig = blockchains[chain];
const [messageApi, contextHolder] = message.useMessage();
const [editedTxid, setEditedTxid] = useState('');
diff --git a/src/components/Nodes/PArewards.tsx b/src/components/Nodes/PArewards.tsx
index c1063ffe..cb50f2a5 100644
--- a/src/components/Nodes/PArewards.tsx
+++ b/src/components/Nodes/PArewards.tsx
@@ -152,7 +152,7 @@ function PArewards(props: {
signature: signature,
redeemScript: props.redeemScript,
publicKey: props.collateralPubKey,
- fluxid: props.sspwid,
+ fluxid: props.sspwid,
};
axios
@@ -210,7 +210,7 @@ function PArewards(props: {
diff --git a/src/components/PoweredByFlux/PoweredByFlux.tsx b/src/components/PoweredByFlux/PoweredByFlux.tsx
index 5b227eb0..2f800905 100644
--- a/src/components/PoweredByFlux/PoweredByFlux.tsx
+++ b/src/components/PoweredByFlux/PoweredByFlux.tsx
@@ -10,7 +10,9 @@ function PoweredByFlux({ isClickeable = false }: Props) {
const [themeStyle, setThemeStyle] = useState(
darkModePreference.matches ? 'light' : 'dark',
);
- const [colorBox, setColorBox] = useState(darkModePreference.matches ? '#333' : '#ddd',);
+ const [colorBox, setColorBox] = useState(
+ darkModePreference.matches ? '#333' : '#ddd',
+ );
const changeTheme = (isDark: boolean) => {
if (isDark) {
@@ -20,7 +22,7 @@ function PoweredByFlux({ isClickeable = false }: Props) {
setThemeStyle('dark');
setColorBox('#ddd');
}
- }
+ };
const open = (url: string) => {
window.open(url, '_blank');
diff --git a/src/components/PublicNoncesReceived/PublicNoncesReceived.tsx b/src/components/PublicNoncesReceived/PublicNoncesReceived.tsx
index a4ba7f57..91303241 100644
--- a/src/components/PublicNoncesReceived/PublicNoncesReceived.tsx
+++ b/src/components/PublicNoncesReceived/PublicNoncesReceived.tsx
@@ -24,9 +24,15 @@ function PublicNoncesReceived(props: {
onCancel={handleOk}
footer={[]}
>
-
+
- {t('home:publicNoncesReceived.public_nonces_received_info')}
+
+ {t('home:publicNoncesReceived.public_nonces_received_info')}
+
diff --git a/src/components/PublicNoncesRejected/PublicNoncesRejected.tsx b/src/components/PublicNoncesRejected/PublicNoncesRejected.tsx
index e50b58ce..1e49f1b7 100644
--- a/src/components/PublicNoncesRejected/PublicNoncesRejected.tsx
+++ b/src/components/PublicNoncesRejected/PublicNoncesRejected.tsx
@@ -24,10 +24,18 @@ function PublicNoncesRejected(props: {
onCancel={handleOk}
footer={[]}
>
-
- {t('home:publicNoncesRejected.public_nonces_rejected_info')}
+
+
+ {t('home:publicNoncesRejected.public_nonces_rejected_info')}
+
- {t('home:publicNoncesRejected.public_nonces_rejected_info_2')}
+
+ {t('home:publicNoncesRejected.public_nonces_rejected_info_2')}
+
diff --git a/src/components/Receive/Receive.tsx b/src/components/Receive/Receive.tsx
index b3e3b710..827f21f8 100644
--- a/src/components/Receive/Receive.tsx
+++ b/src/components/Receive/Receive.tsx
@@ -11,7 +11,9 @@ function Receive(props: {
const { t } = useTranslation(['home', 'common']);
const { open, openAction } = props;
const { activeChain } = useAppSelector((state) => state.sspState);
- const { wallets, walletInUse } = useAppSelector((state) => state[activeChain]);
+ const { wallets, walletInUse } = useAppSelector(
+ (state) => state[activeChain],
+ );
const blockchainConfig = blockchains[activeChain];
const handleOk = () => {
diff --git a/src/components/Settings/Settings.tsx b/src/components/Settings/Settings.tsx
index cc1679f7..8b037b01 100644
--- a/src/components/Settings/Settings.tsx
+++ b/src/components/Settings/Settings.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable @typescript-eslint/no-misused-promises */
import { useEffect, useState } from 'react';
import { Link } from 'react-router-dom';
import { Button, Modal, Input, Space, message, Select } from 'antd';
diff --git a/src/components/SignMessage/SignMessage.tsx b/src/components/SignMessage/SignMessage.tsx
index d623eae8..783dc0ef 100644
--- a/src/components/SignMessage/SignMessage.tsx
+++ b/src/components/SignMessage/SignMessage.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable @typescript-eslint/no-misused-promises */
import { Typography, Button, Space, Modal, Input } from 'antd';
import { useAppSelector } from '../../hooks';
const { Paragraph, Text } = Typography;
diff --git a/src/components/SocketListener/SocketListener.tsx b/src/components/SocketListener/SocketListener.tsx
index c86cb866..5fd81aeb 100644
--- a/src/components/SocketListener/SocketListener.tsx
+++ b/src/components/SocketListener/SocketListener.tsx
@@ -75,5 +75,4 @@ SocketListener.defaultProps = {
ignorePopups: false,
};
-
export default SocketListener;
diff --git a/src/components/Transactions/CountDownTimer.tsx b/src/components/Transactions/CountDownTimer.tsx
index c2c98d82..a67381e2 100644
--- a/src/components/Transactions/CountDownTimer.tsx
+++ b/src/components/Transactions/CountDownTimer.tsx
@@ -1,5 +1,8 @@
import React, { useState } from 'react';
-import { ColorFormat, CountdownCircleTimer } from 'react-countdown-circle-timer';
+import {
+ ColorFormat,
+ CountdownCircleTimer,
+} from 'react-countdown-circle-timer';
interface CountdownTimerProps {
createdAtDateTime: string; // Date-time in ISO format (e.g., "2021-01-01T00:00:00")
@@ -7,7 +10,11 @@ interface CountdownTimerProps {
onFinish?: () => void;
}
-const CountdownTimer: React.FC = ({ createdAtDateTime, expireAtDateTime, onFinish }) => {
+const CountdownTimer: React.FC = ({
+ createdAtDateTime,
+ expireAtDateTime,
+ onFinish,
+}) => {
const [remainingTimeInSeconds] = useState(() => {
const endTime = new Date(expireAtDateTime).getTime();
const now = Date.now();
@@ -15,7 +22,10 @@ const CountdownTimer: React.FC = ({ createdAtDateTime, expi
});
const [color, setColor] = useState('');
- const totalTime = (new Date(expireAtDateTime).getTime() - new Date(createdAtDateTime).getTime()) / 1000;
+ const totalTime =
+ (new Date(expireAtDateTime).getTime() -
+ new Date(createdAtDateTime).getTime()) /
+ 1000;
const getColor = (remainingTimeInSeconds: number) => {
if (remainingTimeInSeconds > 12 * 60) {
@@ -57,4 +67,4 @@ CountdownTimer.defaultProps = {
},
};
-export default CountdownTimer;
\ No newline at end of file
+export default CountdownTimer;
diff --git a/src/components/TxRejected/TxRejected.tsx b/src/components/TxRejected/TxRejected.tsx
index ee4b9d3b..9767ae14 100644
--- a/src/components/TxRejected/TxRejected.tsx
+++ b/src/components/TxRejected/TxRejected.tsx
@@ -24,7 +24,11 @@ function TxRejected(props: {
onCancel={handleOk}
footer={[]}
>
-
+
{t('home:txRejected.tx_rejected_info')}
{t('home:txRejected.tx_rejected_info_2')}
diff --git a/src/contexts/sspConnectContext.tsx b/src/contexts/sspConnectContext.tsx
index 312ac028..04449db6 100644
--- a/src/contexts/sspConnectContext.tsx
+++ b/src/contexts/sspConnectContext.tsx
@@ -97,7 +97,10 @@ export const SspConnectProvider = ({
origin: 'ssp',
data: {
status: t('common:error'),
- result: t('common:request_rejected') + ': ' + t('home:sspConnect.invalid_chain'),
+ result:
+ t('common:request_rejected') +
+ ': ' +
+ t('home:sspConnect.invalid_chain'),
},
});
}
@@ -107,7 +110,10 @@ export const SspConnectProvider = ({
origin: 'ssp',
data: {
status: t('common:error'),
- result: t('common:request_rejected') + ': ' + t('home:sspConnect.invalid_method'),
+ result:
+ t('common:request_rejected') +
+ ': ' +
+ t('home:sspConnect.invalid_method'),
},
});
}
diff --git a/src/fluxsdk.d.ts b/src/fluxsdk.d.ts
index 1eceb389..7e6cd84c 100644
--- a/src/fluxsdk.d.ts
+++ b/src/fluxsdk.d.ts
@@ -19,5 +19,5 @@ declare module '@runonflux/flux-sdk' {
extraEntropy?: Buffer;
},
) => string;
- }
+ };
}
diff --git a/src/lib/blockheight.ts b/src/lib/blockheight.ts
index 8dd0c386..21088b51 100644
--- a/src/lib/blockheight.ts
+++ b/src/lib/blockheight.ts
@@ -1,10 +1,5 @@
import axios from 'axios';
-import {
- getInfoInsight,
- cryptos,
- getInfoBlockbook,
- evm_call,
-} from '../types';
+import { getInfoInsight, cryptos, getInfoBlockbook, evm_call } from '../types';
import { backends } from '@storage/backends';
import { blockchains } from '@storage/blockchains';
diff --git a/src/lib/constructTx.ts b/src/lib/constructTx.ts
index f9e0b7d4..0ef98731 100644
--- a/src/lib/constructTx.ts
+++ b/src/lib/constructTx.ts
@@ -1059,17 +1059,17 @@ export async function constructAndSignEVMTransaction(
});
}
console.log(uoStruct);
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+
const uoStructHexlified = deepHexlify(uoStruct);
const uoStructHash = multiSigSmartAccount
.getEntryPoint()
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
+
.getUserOperationHash(uoStructHexlified);
const multiSigUserOp = new accountAbstraction.userOperation.MultiSigUserOp(
publicKeys,
[publicNonces1, publicNoncesKey],
uoStructHash,
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
+
uoStructHexlified,
);
multiSigUserOp.signMultiSigHash(schnorrSigner1); // we post this to our server
diff --git a/src/lib/currency.ts b/src/lib/currency.ts
index d6795070..01d8d318 100644
--- a/src/lib/currency.ts
+++ b/src/lib/currency.ts
@@ -68,13 +68,23 @@ export function decimalPlaces() {
}
export function formatCrypto(amount: BigNumber, maxDecimals = 8) {
- const formated = amount.toNumber().toLocaleString(navigator.language ?? 'en-US',{ maximumFractionDigits: maxDecimals, minimumFractionDigits: 0 }); // or force 'en-US'?
+ const formated = amount
+ .toNumber()
+ .toLocaleString(navigator.language ?? 'en-US', {
+ maximumFractionDigits: maxDecimals,
+ minimumFractionDigits: 0,
+ }); // or force 'en-US'?
return formated;
}
export function formatFiat(amount: BigNumber) {
const digits = decimalPlaces();
- const formated = amount.toNumber().toLocaleString(navigator.language ?? 'en-US', { maximumFractionDigits: digits, minimumFractionDigits: digits });
+ const formated = amount
+ .toNumber()
+ .toLocaleString(navigator.language ?? 'en-US', {
+ maximumFractionDigits: digits,
+ minimumFractionDigits: digits,
+ });
return formated;
}
diff --git a/src/lib/fingerprint.ts b/src/lib/fingerprint.ts
index 5673d77b..59430391 100644
--- a/src/lib/fingerprint.ts
+++ b/src/lib/fingerprint.ts
@@ -34,7 +34,7 @@ export function getFingerprint(): string {
const txt = 'ClientJS,org