Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(new-market-widget): update add markets to send market map proposal first and validation flow to use v7.x commit #1112

Merged
merged 22 commits into from
Oct 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
chenyaoy committed Oct 4, 2024
commit 28c174ecb166916a89cabc0e185b6fc9b18d5948
19 changes: 1 addition & 18 deletions scripts/markets/help.ts
Original file line number Diff line number Diff line change
@@ -111,23 +111,6 @@ interface ProviderConfig {
metadata_JSON: string;
}

const exchangeNameToMarketMapProviderName: Record<ExchangeName, string> = {
[ExchangeName.Binance]: 'binance_ws',
[ExchangeName.BinanceUS]: 'binance_ws',
[ExchangeName.Bitfinex]: 'bitfinex_ws',
[ExchangeName.Bitstamp]: 'bitstamp_api',
[ExchangeName.Bybit]: 'bybit_ws',
[ExchangeName.CoinbasePro]: 'coinbase_ws',
[ExchangeName.CryptoCom]: 'crypto_dot_com_ws',
[ExchangeName.Gate]: 'gate_ws',
[ExchangeName.Huobi]: 'huobi_ws',
[ExchangeName.Kraken]: 'kraken_api',
[ExchangeName.Kucoin]: 'kucoin_ws',
[ExchangeName.Mexc]: 'mexc_ws',
[ExchangeName.Okx]: 'okx_ws',
[ExchangeName.Raydium]: 'raydium_api',
};

export async function sleep(ms: number): Promise<void> {
return new Promise((resolve) => {
setTimeout(resolve, ms);
@@ -210,7 +193,7 @@ export async function createAndSendMarketMapProposal(
}

return {
name: `${exchangeNameToMarketMapProviderName[config.exchangeName as ExchangeName]}`,
name: config.exchangeName,
normalize_by_pair,
off_chain_ticker: config.ticker,
invert: config.invert || false,

Unchanged files with check annotations Beta

if (isTablet && !canAccountTrade) {
dispatch(openDialog(DialogTypes.Onboarding()));
}
}, []);

Check warning on line 27 in src/components/GuardedMobileRoute.tsx

GitHub Actions / lint

React Hook useEffect has missing dependencies: 'canAccountTrade', 'dispatch', and 'isTablet'. Either include them or remove the dependency array
useEffect(() => {
const dialogClosed =
navigate('/');
}
prevActiveDialog.current = activeDialog;
}, [activeDialog, canAccountTrade, isTablet]);

Check warning on line 38 in src/components/GuardedMobileRoute.tsx

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'navigate'. Either include it or remove the dependency array
return <Outlet />;
};
useEffect(() => {
qrCode.append(ref.current ?? undefined);
}, []);

Check warning on line 73 in src/components/QrCode.tsx

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'qrCode'. Either include it or remove the dependency array
useEffect(() => {
ref.current?.firstElementChild?.setAttribute('viewBox', `0 0 ${size} ${size}`);
}, [ref.current]);

Check warning on line 77 in src/components/QrCode.tsx

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'size'. Either include it or remove the dependency array. Mutable values like 'ref.current' aren't valid dependencies because mutating them doesn't re-render the component
useEffect(() => {
if (hasLogo) {
image: appTheme === AppTheme.Light ? DARK_LOGO_MARK_URL : LIGHT_LOGO_MARK_URL,
});
}
}, [appTheme, hasLogo]);

Check warning on line 85 in src/components/QrCode.tsx

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'qrCode'. Either include it or remove the dependency array
return <$QrCode className={className} ref={ref} />;
};
useEffect(() => {
if (secondsLeft > 0) return;
onTimeOut?.();
}, [secondsLeft]);

Check warning on line 35 in src/components/TimeoutButton.tsx

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'onTimeOut'. Either include it or remove the dependency array. If 'onTimeOut' changes too often, find the parent component that defines it and wrap that definition in useCallback
if (slotFinal && secondsLeft <= 0) return slotFinal;
timeout.current = globalThis.setTimeout(() => {
setIsOpen?.(false, true);
}, duration);
}, [isOpen, isPaused, duration, lastUpdated]);

Check warning on line 63 in src/components/Toast.tsx

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'setIsOpen'. Either include it or remove the dependency array. If 'setIsOpen' changes too often, find the parent component that defines it and wrap that definition in useCallback
return (
<$Root
] as const);
return { zoom, domain, range, visibleData };
}, [data, zoomDomain, minZoomDomain]);

Check warning on line 229 in src/components/visx/TimeSeriesChart.tsx

GitHub Actions / lint

React Hook useMemo has missing dependencies: 'earliestDatum', 'latestDatum', 'xAccessor', and 'yAccessor'. Either include them or remove the dependency array
const { domain, range, visibleData, zoom } = calculatedValues;
if (visibleData) {
onVisibleDataChange?.(visibleData);
}
}, [visibleData]);

Check warning on line 237 in src/components/visx/TimeSeriesChart.tsx

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'onVisibleDataChange'. Either include it or remove the dependency array. If 'onVisibleDataChange' changes too often, find the parent component that defines it and wrap that definition in useCallback
// Events
const onWheel = ({ deltaY }: React.WheelEvent) => {
useEffect(() => {
onTooltipContext?.(tooltipContext);
}, [tooltipContext]);

Check warning on line 133 in src/components/visx/XYChartTooltipWithBounds.tsx

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'onTooltipContext'. Either include it or remove the dependency array. If 'onTooltipContext' changes too often, find the parent component that defines it and wrap that definition in useCallback
const tooltipContent = tooltipContext?.tooltipOpen
? renderTooltip({ ...tooltipContext, colorScale })