@@ -26,8 +26,10 @@ import {
2626 GoalTrackerSkeleton ,
2727 PortfolioChartSkeleton ,
2828} from "./components/SkeletonLoader" ;
29- import { WalletModal } from "./components/WalletModal " ;
29+ import { WalletModalTest } from "./components/WalletModalTest " ;
3030import { ChatInterface , type ChatMessage } from "./components/ChatInterface" ;
31+ import { goalData , initialMessages } from "../config/mockData" ;
32+ import toast from 'react-hot-toast' ;
3133import { GoalTracker } from "./components/GoalTracker" ;
3234import { GlassPanel } from "./components/GlassPanel" ;
3335
@@ -40,13 +42,7 @@ export default function Home() {
4042 isConnecting
4143 } = useFreighter ( ) ;
4244
43- const [ messages , setMessages ] = useState < ChatMessage [ ] > ( [
44- {
45- id : 1 ,
46- sender : "agent" ,
47- text : "Welcome to Smasage! 👋 I'm OpenClaw, your personal AI savings assistant natively built on Stellar. What financial goal can we crush today?" ,
48- } ,
49- ] ) ;
45+ const [ messages , setMessages ] = useState < ChatMessage [ ] > ( initialMessages ) ;
5046 const [ isTyping , setIsTyping ] = useState ( false ) ;
5147
5248 const [ allocations , setAllocations ] = useState < AssetAllocation [ ] > (
@@ -56,15 +52,6 @@ export default function Home() {
5652 const [ wsConnected , setWsConnected ] = useState ( false ) ;
5753 const [ isLoading , setIsLoading ] = useState ( true ) ;
5854
59- // Goal data (Memoized to avoid unnecessary effect triggers)
60- const goalData = useMemo < GoalData > ( ( ) => ( {
61- currentBalance : 12450 ,
62- targetAmount : 18000 ,
63- targetDate : "2026-08-01" ,
64- monthlyContribution : 500 ,
65- expectedAPY : 8.5 ,
66- } ) , [ ] ) ;
67-
6855 // Calculate goal status and progress using useMemo to avoid cascading renders
6956 const { goalStatus, progress } = useMemo ( ( ) => {
7057 const result = evaluateGoalStatus ( goalData ) ;
@@ -94,6 +81,13 @@ export default function Home() {
9481 setMessages ( ( prev : ChatMessage [ ] ) => [ ...prev , agentMsg ] ) ;
9582 console . log ( "[App] Agent message received" , text ) ;
9683
84+ // Show toast for proactive messages
85+ if ( proactive ) {
86+ toast ( '💡 New suggestion from OpenClaw' , {
87+ duration : 5000 ,
88+ } ) ;
89+ }
90+
9791 // Parse allocations if present
9892 const parsedAllocations = parseAllocationsFromMessage ( text ) ;
9993 if ( parsedAllocations ) {
@@ -103,6 +97,7 @@ export default function Home() {
10397 } ,
10498 onError : ( error ) => {
10599 console . error ( "[App] WebSocket error:" , error ) ;
100+ toast . error ( 'Failed to connect to notification service' ) ;
106101 } ,
107102 enabled : true ,
108103 } ) ;
@@ -169,7 +164,7 @@ export default function Home() {
169164 />
170165 </ DashboardHeader >
171166
172- < WalletModal
167+ < WalletModalTest
173168 isOpen = { showInstallModal }
174169 onClose = { ( ) => setShowInstallModal ( false ) }
175170 />
0 commit comments