Remove ETH special portfolio tracking

Treat ETH like any other token — display only spot/future price
and funding rate, removing personal portfolio calculations.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 15:14:39 +07:00
parent c5c1cdf0d5
commit 59da49c17f
-51
View File
@@ -3,8 +3,6 @@ package commands
import (
"strings"
"golang.org/x/text/language"
"golang.org/x/text/message"
"gopkg.in/telebot.v3"
"me.thuanle/bbot/internal/configs/tele"
"me.thuanle/bbot/internal/data"
@@ -13,8 +11,6 @@ import (
"me.thuanle/bbot/internal/services/tele/view"
)
var lastEthPrice float64
func showStickerMode(context telebot.Context, token string) {
token = strings.ToUpper(token)
stickerIdx, ok := tele.Token2StickerIdxMap[token]
@@ -60,53 +56,6 @@ func OnTokenInfoByToken(context telebot.Context, token string) error {
sp, _ := data.Market.GetSpotPrice(sSymbol)
_ = chat.ReplyMessage(context, view.RenderOnPriceMessage(symbols[0], sp, fp, fundRate, fundTime, tokenInterestRate))
if strings.ToUpper(token) == "ETH" {
mFmt := message.NewPrinter(language.AmericanEnglish)
realAmount := 35.
trangBucAmount := 14.
basePrice := 2500.0
baseTotal := realAmount * basePrice
trangBucTotal := trangBucAmount * basePrice
realCurTotal := realAmount * sp
trangBucCurTotal := trangBucAmount * sp
lastDelta := ""
if lastEthPrice == 0 {
lastEthPrice = sp
} else {
lastDelta = mFmt.Sprintf(
"Δ price: $%+.0f\n"+
"Δ Usdt: $%+.0f\n",
sp-lastEthPrice,
(sp-lastEthPrice)*realAmount,
)
lastEthPrice = sp
}
msg := mFmt.Sprintf(
"🎉🎊🎊🦈🦈🦈 @th13vn Real 🦈🦈🦈🎊🎊🎉\n"+
"∑ USDT: $%.0f\n"+
"Lợi nhuận: $%.0f\n"+
"%s\n"+
"\n"+
"🚀🚀🚀🚀🚀 Road to 5k 🚀🚀🚀🚀🚀: \n"+
"- Δ Price: $%0.0f\n"+
"- Δ Vol: $%0.0f\n"+
"\n"+
"💸💸💸💸💸 Trang Bức balance 💸💸💸💸💸\n"+
"∑ USDT: $%.0f\n"+
"Lợi nhuận: $%.0f\n",
realCurTotal,
realCurTotal-baseTotal,
lastDelta,
5000-sp,
5000*realAmount-realCurTotal,
trangBucCurTotal,
trangBucCurTotal-trangBucTotal,
)
_ = chat.ReplyMessage(context, msg)
}
return nil
}