mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix: chain providers, i18n, dedup isWebRuntime, and a11y label
Conditionally build `chainProviders` so empty `urls` arrays are never passed downstream. Replace hardcoded "Chain ticker: " with `capitalize(t('chain_ticker'))` and add the translation key to all locales. Remove the duplicate `isWebRuntime` in `media-hosting-settings.tsx` in favor of the shared implementation in `show-upload-controls`. Add `aria-label` to the directory codes input in `TopbarEditModal`.
This commit is contained in:
@@ -226,16 +226,13 @@ const AdvancedSettings = () => {
|
||||
const plebbitRpcClientsOptions = p2pRpcRef.current?.value.trim() ? [p2pRpcRef.current.value.trim()] : undefined;
|
||||
const dataPath = p2pDataPathRef.current?.value.trim() || undefined;
|
||||
|
||||
const chainProviders = {
|
||||
eth: {
|
||||
urls: ethRpcUrls,
|
||||
chainId: 1,
|
||||
},
|
||||
sol: {
|
||||
urls: solRpcUrls,
|
||||
chainId: 101,
|
||||
},
|
||||
};
|
||||
const chainProviders: Record<string, { urls: string[] | undefined; chainId: number }> = {};
|
||||
if (ethRpcUrls && ethRpcUrls.length > 0) {
|
||||
chainProviders.eth = { urls: ethRpcUrls, chainId: 1 };
|
||||
}
|
||||
if (solRpcUrls && solRpcUrls.length > 0) {
|
||||
chainProviders.sol = { urls: solRpcUrls, chainId: 101 };
|
||||
}
|
||||
|
||||
try {
|
||||
await setAccount({
|
||||
|
||||
Reference in New Issue
Block a user