@@ -19,8 +19,6 @@ import {
1919 DEFAULT_DARK_MODE ,
2020 defaultPreferences ,
2121 deserializeTransaction ,
22- EthereumConnectionUrl ,
23- EthereumExplorer ,
2422 getAccountRecoveryPaths ,
2523 getAddMessage ,
2624 getRecoveryPaths ,
@@ -60,11 +58,17 @@ import {
6058 NOTIFICATION_USER_ACCOUNT_PUBLIC_KEY_DELETED ,
6159 NOTIFICATION_USER_ACCOUNT_PUBLIC_KEYS_UPDATED ,
6260 NOTIFICATION_XNFT_PREFERENCE_UPDATED ,
61+ TAB_APPS ,
62+ TAB_BALANCES ,
6363 TAB_BALANCES_SET ,
64+ TAB_MESSAGES ,
65+ TAB_NFTS ,
66+ TAB_NOTIFICATIONS ,
67+ TAB_RECENT_ACTIVITY ,
68+ TAB_SWAP ,
6469 TAB_TOKENS ,
6570 TAB_XNFT ,
6671} from "@coral-xyz/common" ;
67- import { makeDefaultNav } from "@coral-xyz/recoil" ;
6872import type {
6973 BlockchainKeyring ,
7074 KeyringStore ,
@@ -2068,6 +2072,30 @@ export class Backend {
20682072export const SUCCESS_RESPONSE = "success" ;
20692073const defaultNav = makeDefaultNav ( ) ;
20702074
2075+ function makeDefaultNav ( ) {
2076+ const defaultNav : any = {
2077+ activeTab : TAB_TOKENS ,
2078+ data : { } ,
2079+ } ;
2080+ [
2081+ [ TAB_BALANCES , "Balances" ] ,
2082+ [ TAB_NFTS , "Nfts" ] ,
2083+ [ TAB_SWAP , "Swap" ] ,
2084+ [ TAB_APPS , "Apps" ] ,
2085+ [ TAB_MESSAGES , "Messages" ] ,
2086+ [ TAB_RECENT_ACTIVITY , "Recent Activity" ] ,
2087+ [ TAB_NOTIFICATIONS , "Notifications" ] ,
2088+ [ TAB_TOKENS , "Tokens" ] ,
2089+ ] . forEach ( ( [ tabName , tabTitle ] ) => {
2090+ defaultNav . data [ tabName ] = {
2091+ id : tabName ,
2092+ urls : [ makeUrl ( tabName , { title : tabTitle , props : { } } ) ] ,
2093+ ref : tabName === "balances" ? "tokens" : undefined ,
2094+ } ;
2095+ } ) ;
2096+ return defaultNav ;
2097+ }
2098+
20712099function setSearchParam ( url : string , key : string , value : string ) : string {
20722100 const [ path , search ] = url . split ( "?" ) ;
20732101 const searchParams = new URLSearchParams ( search ) ;
0 commit comments