|
|
@@ -114,9 +114,11 @@ export class JupiterSwapper {
|
|
|
headers: this.getHeaders(),
|
|
|
})
|
|
|
if (response.ok) {
|
|
|
- const data = (await response.json()) as { data?: Record<string, { price?: number; symbol?: string }> }
|
|
|
- if (data.data) {
|
|
|
- Object.assign(result, data.data)
|
|
|
+ const data = (await response.json()) as Record<string, { usdPrice?: number }>
|
|
|
+ for (const [mint, info] of Object.entries(data)) {
|
|
|
+ if (info.usdPrice) {
|
|
|
+ result[mint] = { price: info.usdPrice }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} catch (error) {
|