feat: sexo history

This commit is contained in:
OpenSquared
2026-07-18 18:54:12 +02:00
parent ec5cf5abf4
commit 212bdf6678
4 changed files with 34 additions and 12 deletions

View File

@@ -1730,7 +1730,10 @@ export const useSaxoSymbols = () =>
queryFn: () => api.get('/saxo/symbols').then(r => r.data),
})
export type SaxoValidation = { symbol: string; valid: boolean; uic: number | null; error: string | null }
export type SaxoValidation = {
symbol: string; valid: boolean; uic: number | null; error: string | null
matched_symbol?: string; description?: string; asset_type?: string
}
export const useValidateSaxoWatchlist = () =>
useQuery<SaxoValidation[]>({

View File

@@ -547,7 +547,9 @@ function SaxoConnectionCard() {
return (
<span key={sym} className={clsx('badge flex items-center gap-1.5',
check ? (check.valid ? 'badge-green' : 'badge-red') : 'badge-blue')}
title={check && !check.valid ? check.error ?? 'Symbole non résolu par Saxo' : undefined}
title={check ? (check.valid
? `Résolu: ${check.matched_symbol ?? '?'} — ${check.description ?? ''} (${check.asset_type ?? '?'}, Uic ${check.uic})`
: check.error ?? 'Symbole non résolu par Saxo') : undefined}
>
{sym}
{check && (check.valid ? <CheckCircle className="w-3 h-3" /> : <XCircle className="w-3 h-3" />)}