File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
apps/dashboard/src/components/pay Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const TRACKING_CATEGORY = "token_discovery";
2727export const RouteDiscovery : React . FC = ( ) => {
2828 const [ isSubmitSuccess , setIsSubmitSuccess ] = useState ( false ) ;
2929 const [ isSubmitFail , setIsSubmitFailed ] = useState ( false ) ;
30- const [ routeError , setError ] = useState < Error > ( ) ;
30+ const [ routeError , setError ] = useState < string > ( ) ;
3131 const walletChain = useActiveWalletChain ( ) ;
3232
3333 // State to track the selected chain ID directly from the NetworkSelectorButton
@@ -87,13 +87,13 @@ export const RouteDiscovery: React.FC = () => {
8787 } ) ;
8888 } ,
8989 onError : ( err ) => {
90- setError ( err ) ;
90+ setError ( err . message ) ;
9191 setIsSubmitFailed ( true ) ;
9292 toast . error ( "Token Submission Failed" ) ;
9393
9494 // Get appropriate error message
9595 let errorMessage = "An unknown error occurred" ;
96- if ( err instanceof Error ) {
96+ if ( err ) {
9797 errorMessage = err . message ;
9898 }
9999
@@ -136,9 +136,7 @@ export const RouteDiscovery: React.FC = () => {
136136 Please double check the network and token address. If issues persist,
137137 please reach out to our support team.
138138 { routeError && (
139- < span className = "mt-1 block text-sm" >
140- Error: { routeError . message }
141- </ span >
139+ < span className = "mt-1 block text-sm" > Error: { routeError } </ span >
142140 ) }
143141 </ p >
144142 </ div >
You can’t perform that action at this time.
0 commit comments