-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hide cross-chain from safe app (#2560)
- Loading branch information
Showing
2 changed files
with
8 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,6 +177,9 @@ export default function App() { | |
const prevOnline = usePrevious(online) | ||
useSessionExpiredGlobal() | ||
|
||
const ancestorOrigins = window.location.ancestorOrigins | ||
const isSafeAppOrigin = !!ancestorOrigins?.[ancestorOrigins.length - 1]?.includes('app.safe.global') | ||
|
||
useEffect(() => { | ||
if (prevOnline === false && online && account) { | ||
// refresh page when network back to normal to prevent some issues: ex: stale data, ... | ||
|
@@ -238,7 +241,7 @@ export default function App() { | |
{/* From [email protected], :fromCurrency-to-:toCurrency no long works, need to manually parse the params */} | ||
<Route path={`${APP_PATHS.SWAP}/:network/:currency?`} element={<SwapPage />} /> | ||
<Route path={`${APP_PATHS.PARTNER_SWAP}`} element={<PartnerSwap />} /> | ||
{CHAINS_SUPPORT_CROSS_CHAIN.includes(chainId) && ( | ||
{CHAINS_SUPPORT_CROSS_CHAIN.includes(chainId) && !isSafeAppOrigin && ( | ||
<Route path={`${APP_PATHS.CROSS_CHAIN}`} element={<SwapV3 />} /> | ||
)} | ||
|
||
|