Skip to content

Commit 6c54506

Browse files
committed
fixup! fixup! Use ratex v3 if transactions has full pluginId/tokenId values
1 parent d2d1f3a commit 6c54506

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/ratesEngine.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ async function updateTxValuesV3(transaction: DbTx): Promise<void> {
189189
},
190190
body: JSON.stringify(ratesRequest)
191191
})
192+
if (!ratesResponse.ok) {
193+
const errorText = await ratesResponse.text()
194+
throw new Error(
195+
`Rates v3 error (${ratesResponse.status} ${ratesResponse.statusText}): ${errorText}`
196+
)
197+
}
192198
const ratesResponseJson = await ratesResponse.json()
193199
const rates = asRatesV3Params(ratesResponseJson)
194200
const depositRateObf = depositIsFiat

0 commit comments

Comments
 (0)