Skip to content

Commit 0ce0c48

Browse files
committed
Fix lint
1 parent 19e2293 commit 0ce0c48

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

frontend/src/components/Notice.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ const VALID_TYPES = ['alert-error', 'alert-warning', 'alert-success', 'alert-inf
66

77
const Notice = ({ type = 'info', message, className = '', onClose, children, buttonText }) => {
88
const validType = VALID_TYPES.find(t => t.includes(type)) || 'alert-info'
9-
const iconExists = Boolean(ICONS[type === 'success' ? 'check' : type])
10-
const iconName = iconExists ? type : 'info'
9+
const baseIconName = type === 'success' ? 'check' : type
10+
const iconName = ICONS[baseIconName] ? baseIconName : 'info'
1111

1212
return (
1313
<div className={`alert mb-6 ${validType} alert-outline ${className}`}>
14-
<Icon name={type === 'success' ? 'check' : type} size={6} className="shrink-0" />
14+
<Icon name={iconName} size={6} className="shrink-0" />
1515
<div>{message || children}</div>
1616
{onClose && (
1717
<button

frontend/src/utils/networks.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export const getBlockExplorerDomain = (chainId) => {
5858
84532: 'sepolia.basescan.org', // Base Sepolia
5959
421614: 'sepolia.arbiscan.io', // Arbitrum Sepolia
6060
59141: 'sepolia.lineascan.build', // Linea Sepolia
61-
57073: 'explorer-sepolia.inkonchain.com', // Ink Sepolia (same chain ID as mainnet?)
6261
1302: 'unichain-sepolia.blockscout.com', // Unichain Sepolia
6362
534351: 'sepolia.scrollscan.com', // Scroll Sepolia
6463
};
@@ -86,4 +85,4 @@ export const getBlockExplorerAddressUrl = (chainId, address) => {
8685
export const getBlockExplorerTxUrl = (chainId, txHash) => {
8786
const domain = getBlockExplorerDomain(chainId);
8887
return `https://${domain}/tx/${txHash}`;
89-
};
88+
};

frontend/src/utils/web3UriParser.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
* - Query parameters: value, payable, returns, mode
88
*/
99

10-
import { getNetworkName } from './networks';
11-
1210
/**
1311
* Validates if a string is a valid Solidity type
1412
* @param {string} type - Type to validate
@@ -94,7 +92,8 @@ export const parseWeb3Uri = (uri) => {
9492
}
9593

9694
// Parse authority: contract[:chainId]
97-
let [contract, chainId] = authority.split(':');
95+
const [contract, chainIdRaw] = authority.split(':');
96+
let chainId = chainIdRaw;
9897
if (chainId) {
9998
chainId = Number.parseInt(chainId, 10) || undefined;
10099
}
@@ -401,4 +400,4 @@ export const parseFormData = (uri, metadata) => {
401400
errors: ['Something went wrong while processing the web3 link. Please check the format.']
402401
};
403402
}
404-
};
403+
};

0 commit comments

Comments
 (0)