@@ -53,18 +53,18 @@ server.listen(4001, () => {
53
53
let walletAddress = null ;
54
54
let listSharkFollowed = [ ] ;
55
55
56
- io . on ( "connection" , async function ( socket ) {
57
- // console.log("Someone connected");
56
+ // io.on("connection", async function (socket) {
57
+ // console.log("Someone connected");
58
58
59
- socket . on ( "get-wallet-address" , async ( address ) => {
60
- if ( address !== null ) {
61
- walletAddress = address ;
62
- console . log ( "global" , walletAddress ) ;
59
+ // socket.on("get-wallet-address", async (address) => {
60
+ // if (address !== null) {
61
+ // walletAddress = address;
62
+ // console.log("global", walletAddress);
63
63
64
- listSharkFollowed = await getListOfSharkFollowed ( walletAddress ) ;
65
- }
66
- } ) ;
67
- } ) ;
64
+ // listSharkFollowed = await getListOfSharkFollowed(walletAddress);
65
+ // }
66
+ // });
67
+ // });
68
68
69
69
// listSharkFollowed = await getListOfSharkFollowed(walletAddress);
70
70
@@ -74,14 +74,14 @@ InvestorModel.watch([
74
74
if ( walletAddress !== null ) {
75
75
for ( var shark of listSharkFollowed . datas ) {
76
76
const newTransactions = await getNewTransactions ( shark . sharkId ) ;
77
-
78
- if ( newTransactions . transactionsHistory . length > 0 ) {
77
+
78
+ if ( newTransactions . transactionsHistory . length > 0 ) {
79
79
io . emit ( "new-transactions" , {
80
80
newTransactions : newTransactions ,
81
81
sharkId : shark . sharkId
82
82
} ) ;
83
83
}
84
-
84
+
85
85
}
86
86
}
87
87
} ) ;
0 commit comments