Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
3a739476
Unverified
Commit
3a739476
authored
Jun 12, 2023
by
Tina
Committed by
GitHub
Jun 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Catch routing-api v2 no liquidity error case (#6742)
catch URA no liquidity case
parent
04e4335c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
v2Slice.ts
src/state/routing/v2Slice.ts
+4
-1
No files found.
src/state/routing/v2Slice.ts
View file @
3a739476
...
@@ -80,7 +80,10 @@ export const routingApiV2 = createApi({
...
@@ -80,7 +80,10 @@ export const routingApiV2 = createApi({
// cast as any here because we do a runtime check on it being an object before indexing into .errorCode
// cast as any here because we do a runtime check on it being an object before indexing into .errorCode
const
errorData
=
response
.
error
.
data
as
any
const
errorData
=
response
.
error
.
data
as
any
// NO_ROUTE should be treated as a valid response to prevent retries.
// NO_ROUTE should be treated as a valid response to prevent retries.
if
(
typeof
errorData
===
'
object
'
&&
errorData
?.
errorCode
===
'
NO_ROUTE
'
)
{
if
(
typeof
errorData
===
'
object
'
&&
(
errorData
?.
errorCode
===
'
NO_ROUTE
'
||
errorData
?.
detail
===
'
No quotes available
'
)
)
{
return
{
data
:
{
state
:
QuoteState
.
NOT_FOUND
}
}
return
{
data
:
{
state
:
QuoteState
.
NOT_FOUND
}
}
}
}
}
catch
{
}
catch
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment