lint fixes

This commit is contained in:
Boki 2025-06-20 07:15:12 -04:00
parent 1f190b1068
commit c1d04723e1
17 changed files with 34 additions and 27 deletions

View file

@ -337,10 +337,11 @@ export function calculateRollingMetrics(
case 'volatility':
rollingMetrics.push(calculateVolatility(window));
break;
case 'return':
case 'return': {
const avgReturn = window.reduce((sum, ret) => sum + ret, 0) / window.length;
rollingMetrics.push(avgReturn);
break;
}
}
}

View file

@ -1,4 +1,10 @@
export function createProxyUrl(proxy: any): string {
export function createProxyUrl(proxy: {
protocol: string;
host: string;
port: number;
username?: string;
password?: string;
}): string {
const { protocol, host, port, username, password } = proxy;
if (username && password) {
return `${protocol}://${encodeURIComponent(username)}:${encodeURIComponent(password)}@${host}:${port}`;