-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SOV-2028: Enforce Babelfish Aggregator pause state for tokens on Brid…
…ge (#2517) * Add Babelfish subgraph * Add Babelfish client * Fetch paused tokens * Check the correct contract for crossbridge assets * chore: remove old comment --------- Co-authored-by: soulBit <[email protected]>
- Loading branch information
Showing
16 changed files
with
2,773 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/app/pages/BridgeDepositPage/hooks/useGetPausedTokens.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { useMemo } from 'react'; | ||
import { babelfishClient } from 'utils/clients'; | ||
import { useGetPausedBassetListQuery } from 'utils/graphql/babelfish/generated'; | ||
|
||
export const useGetPausedTokens = () => { | ||
const { data } = useGetPausedBassetListQuery({ client: babelfishClient }); | ||
|
||
const pausedTokens = useMemo(() => data?.bassets.map(item => item.id) || [], [ | ||
data, | ||
]); | ||
|
||
return pausedTokens; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ApolloClient, InMemoryCache } from '@apollo/client'; | ||
import { graphBabelfishUrl, graphRskUrl } from './classifiers'; | ||
|
||
export const rskClient = new ApolloClient({ | ||
uri: graphRskUrl, | ||
cache: new InMemoryCache({ | ||
resultCaching: false, | ||
}), | ||
}); | ||
|
||
export const babelfishClient = new ApolloClient({ | ||
uri: graphBabelfishUrl, | ||
cache: new InMemoryCache({ | ||
resultCaching: false, | ||
}), | ||
}); |
Oops, something went wrong.