enhanced alert granularity with min/max thresholds

This commit is contained in:
KS Jannette
2026-03-06 23:33:12 -05:00
parent d3530deb46
commit 0fb4dcd7d1
10 changed files with 479 additions and 61 deletions

View File

@@ -90,6 +90,14 @@ func LessThan(weiA, weiB string) (bool, error) {
return cmp < 0, nil
}
func LessThanOrEqual(weiA, weiB string) (bool, error) {
cmp, err := Compare(weiA, weiB)
if err != nil {
return false, err
}
return cmp <= 0, nil
}
// FormatAsEth formats a Wei string as "X.XXXX ETH".
func FormatAsEth(weiString string, decimals int) (string, error) {
eth, err := ToEth(weiString)