Skip to content

Commit 3122a0e

Browse files
committedMay 21, 2023
test
1 parent b8bf32f commit 3122a0e

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed
 

‎package-lock.json

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/index.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,18 @@ server.listen(4001, () => {
5353
let walletAddress = null;
5454
let listSharkFollowed = [];
5555

56-
io.on("connection", async function (socket) {
57-
// console.log("Someone connected");
56+
// io.on("connection", async function (socket) {
57+
// console.log("Someone connected");
5858

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);
6363

64-
listSharkFollowed = await getListOfSharkFollowed(walletAddress);
65-
}
66-
});
67-
});
64+
// listSharkFollowed = await getListOfSharkFollowed(walletAddress);
65+
// }
66+
// });
67+
// });
6868

6969
// listSharkFollowed = await getListOfSharkFollowed(walletAddress);
7070

@@ -74,14 +74,14 @@ InvestorModel.watch([
7474
if (walletAddress !== null) {
7575
for (var shark of listSharkFollowed.datas) {
7676
const newTransactions = await getNewTransactions(shark.sharkId);
77-
78-
if (newTransactions.transactionsHistory.length > 0){
77+
78+
if (newTransactions.transactionsHistory.length > 0) {
7979
io.emit("new-transactions", {
8080
newTransactions: newTransactions,
8181
sharkId: shark.sharkId
8282
});
8383
}
84-
84+
8585
}
8686
}
8787
});

0 commit comments

Comments
 (0)
Please sign in to comment.