Skip to content

Commit 1efc1a2

Browse files
committed
mod: comment check phising address
1 parent a9a612c commit 1efc1a2

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

internal/middleware/plugins/safety.go

+12-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package plugins
22

33
import (
44
"encoding/json"
5-
"fmt"
65
"strings"
76
"sync"
87
"time"
@@ -106,21 +105,21 @@ func (m *SafetyMiddleware) OnRequest(session *rpc.Session) error {
106105
case strings.ToLower("_sendTransaction"):
107106
targetAddress = params.([]interface{})[0].(map[string]interface{})["to"].(string)
108107
case strings.ToLower("_sendTransactionAsFeePayer"):
109-
//targetAddress = params.([]interface{})[0].(map[string]interface{})["to"].(string)
108+
targetAddress = params.([]interface{})[0].(map[string]interface{})["to"].(string)
110109
}
111110

112111
if len(targetAddress) != 0 {
113-
phishing, pha := m.isPhishingAddress(targetAddress)
114-
if phishing {
115-
reporter := ""
116-
if len(pha.Reporter) > 0 {
117-
reporter = "Reporter: " + pha.Reporter
118-
}
119-
alert.AlertDiscord(ctx, fmt.Sprintf("Option denied - scam address %s %s", m.shortAddress(targetAddress), reporter))
120-
logger.Error("Option denied", "target", targetAddress, "Reason", pha.Description, "reporter", pha.Reporter)
121-
// no return error, just log and alert
122-
//return aggregator.ErrDenyRequest
123-
}
112+
// phishing, pha := m.isPhishingAddress(targetAddress)
113+
// if phishing {
114+
// reporter := ""
115+
// if len(pha.Reporter) > 0 {
116+
// reporter = "Reporter: " + pha.Reporter
117+
// }
118+
// alert.AlertDiscord(ctx, fmt.Sprintf("Option denied - scam address %s %s", m.shortAddress(targetAddress), reporter))
119+
// logger.Error("Option denied", "target", targetAddress, "Reason", pha.Description, "reporter", pha.Reporter)
120+
// // no return error, just log and alert
121+
// //return aggregator.ErrDenyRequest
122+
// }
124123
}
125124

126125
}

0 commit comments

Comments
 (0)