You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Send notification for successful auto-rebalance
217
-
try{
218
-
awaitnotificationService.notify({
219
-
userId: portfolio.userAddress,
220
-
eventType: 'rebalance',
221
-
title: 'Portfolio Rebalanced',
222
-
message: `Your portfolio has been automatically rebalanced. ${rebalanceResult.trades||0} trades executed with ${rebalanceResult.gasUsed||'0 XLM'} gas used.`,
223
-
data: {
224
-
portfolioId,
225
-
trades: rebalanceResult.trades,
226
-
gasUsed: rebalanceResult.gasUsed,
227
-
trigger: 'automatic'
228
-
},
229
-
timestamp: newDate().toISOString()
230
-
})
231
-
}catch(notificationError){
232
-
logger.error('Failed to send rebalance notification',{
// Send notification for successful auto-rebalance
226
+
try{
227
+
awaitnotificationService.notify({
228
+
userId: portfolio.userAddress,
229
+
eventType: 'rebalance',
230
+
title: rebalanceResult.status==='partial'
231
+
? 'Portfolio Partially Rebalanced'
232
+
: 'Portfolio Rebalanced',
233
+
message: `Your portfolio has been automatically rebalanced. ${rebalanceResult.trades||0} trades executed with ${rebalanceResult.gasUsed||'0 XLM'} gas used.`,
234
+
data: {
235
+
portfolioId,
236
+
trades: rebalanceResult.trades,
237
+
gasUsed: rebalanceResult.gasUsed,
238
+
trigger: 'automatic',
239
+
status: rebalanceResult.status
240
+
},
241
+
timestamp: newDate().toISOString()
242
+
})
243
+
}catch(notificationError){
244
+
logger.error('Failed to send rebalance notification',{
0 commit comments