-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd9a79f
commit f72326b
Showing
9 changed files
with
67 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package core | ||
|
||
type AttachedAccount struct { | ||
Name string | ||
Image string | ||
Name string | ||
Symbol string | ||
Image string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package spam | ||
|
||
import ( | ||
"fmt" | ||
|
||
rules "github.com/tonkeeper/scam_backoffice_rules" | ||
"github.com/tonkeeper/tongo" | ||
) | ||
|
||
type SpamFilter struct { | ||
Rules rules.Rules | ||
JettonEvaluate *rules.JettonEvaluate | ||
} | ||
|
||
func NewSpamFilter() *SpamFilter { | ||
return &SpamFilter{ | ||
Rules: rules.GetDefaultRules(), | ||
JettonEvaluate: rules.NewJettonEvaluate(), | ||
} | ||
} | ||
|
||
func (s *SpamFilter) GetRules() rules.Rules { | ||
return s.Rules | ||
} | ||
|
||
func (s *SpamFilter) CheckJettonAction(address tongo.AccountID, symbol string) rules.TypeOfAction { | ||
fmt.Println(s.JettonEvaluate.Jettons) | ||
return s.JettonEvaluate.SearchAction(address, symbol) | ||
} |