perf: 底层逻辑优化
统一不同链交易处理 适配 polygon usdt 非订单监控
This commit is contained in:
+6
-11
@@ -65,17 +65,12 @@ func (o *TradeOrders) OrderSetExpired() {
|
||||
DB.Save(o)
|
||||
}
|
||||
|
||||
func (o *TradeOrders) OrderUpdateTxInfo(refBlockNum int64, fromAddress, tradeHash string, confirmedAt time.Time) {
|
||||
o.FromAddress = fromAddress
|
||||
o.ConfirmedAt = confirmedAt
|
||||
o.TradeHash = tradeHash
|
||||
o.RefBlockNum = refBlockNum
|
||||
|
||||
DB.Save(o)
|
||||
}
|
||||
|
||||
func (o *TradeOrders) MarkSuccess() {
|
||||
o.Status = OrderStatusSuccess // 标记成功
|
||||
func (o *TradeOrders) MarkSuccess(blockNum int64, from, hash string, at time.Time) {
|
||||
o.FromAddress = from
|
||||
o.ConfirmedAt = at
|
||||
o.TradeHash = hash
|
||||
o.RefBlockNum = blockNum
|
||||
o.Status = OrderStatusSuccess
|
||||
|
||||
DB.Save(o)
|
||||
}
|
||||
|
||||
+10
-65
@@ -11,27 +11,14 @@ import (
|
||||
"github.com/v03413/bepusdt/app/help"
|
||||
"github.com/v03413/bepusdt/app/log"
|
||||
"github.com/v03413/bepusdt/app/model"
|
||||
"github.com/v03413/bepusdt/app/notify"
|
||||
"github.com/v03413/bepusdt/app/telegram"
|
||||
"io"
|
||||
"math/big"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
type polygonUsdtTransfer struct {
|
||||
From string
|
||||
To string
|
||||
Amount float64
|
||||
Hash string
|
||||
BlockNum int64
|
||||
Timestamp time.Time
|
||||
TradeType string
|
||||
}
|
||||
|
||||
var polygonLastBlockNumber int64
|
||||
var polygonBlockScanQueue = chanx.NewUnboundedChan[int64](context.Background(), 30)
|
||||
var polygonUsdtTransferQueue = chanx.NewUnboundedChan[[]polygonUsdtTransfer](context.Background(), 30)
|
||||
|
||||
const usdtPolygonContractAddress = "0xc2132d05d31c914a87c6611c10748aeb04b58e8f"
|
||||
const usdtPolygonTransferMethodID = "0xa9059cbb" // Function: transfer(address recipient, uint256 amount)
|
||||
@@ -40,48 +27,6 @@ const contentType = "application/json"
|
||||
func init() {
|
||||
RegisterSchedule(time.Second*3, polygonBlockNumber)
|
||||
RegisterSchedule(time.Second, polygonBlockScan)
|
||||
RegisterSchedule(time.Second, polygonUsdtTransferHandle)
|
||||
}
|
||||
|
||||
func polygonUsdtTransferHandle(time.Duration) {
|
||||
for {
|
||||
select {
|
||||
case transfers := <-polygonUsdtTransferQueue.Out:
|
||||
var orders = getAllWaitingOrders()
|
||||
for _, t := range transfers {
|
||||
// 计算交易金额
|
||||
var amount, quant = parseTransAmount(t.Amount)
|
||||
|
||||
// 判断金额是否在允许范围内
|
||||
if !inPaymentAmountRange(amount) {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
// 判断是否存在对应订单
|
||||
order, is := orders[fmt.Sprintf("%s%v%s", t.To, quant, t.TradeType)]
|
||||
if !is {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
// 有效期检测
|
||||
if !order.CreatedAt.Before(t.Timestamp) || !order.ExpiredAt.After(t.Timestamp) {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
// 更新信息
|
||||
order.OrderUpdateTxInfo(t.BlockNum, t.From, t.Hash, t.Timestamp)
|
||||
|
||||
// 标记成功
|
||||
order.MarkSuccess()
|
||||
|
||||
go notify.Handle(order) // 通知订单支付成功
|
||||
go telegram.SendTradeSuccMsg(order) // TG发送订单信息
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func polygonProcessBlock(n any) {
|
||||
@@ -118,7 +63,7 @@ func polygonProcessBlock(n any) {
|
||||
|
||||
var result = data.Get("result")
|
||||
var timestamp = help.HexStr2Int(result.Get("timestamp").String())
|
||||
var transfers = make([]polygonUsdtTransfer, 0)
|
||||
var transfers = make([]transfer, 0)
|
||||
for _, v := range result.Get("transactions").Array() {
|
||||
if v.Get("to").String() != usdtPolygonContractAddress {
|
||||
|
||||
@@ -139,14 +84,14 @@ func polygonProcessBlock(n any) {
|
||||
continue
|
||||
}
|
||||
|
||||
transfers = append(transfers, polygonUsdtTransfer{
|
||||
From: v.Get("from").String(),
|
||||
To: "0x" + input[34:74],
|
||||
Amount: float64(amount.Int64()),
|
||||
Hash: v.Get("hash").String(),
|
||||
BlockNum: num,
|
||||
Timestamp: time.Unix(timestamp.Int64(), 0),
|
||||
TradeType: model.OrderTradeTypeUsdtPolygon,
|
||||
transfers = append(transfers, transfer{
|
||||
FromAddress: v.Get("from").String(),
|
||||
RecvAddress: "0x" + input[34:74],
|
||||
Amount: float64(amount.Int64()),
|
||||
TxHash: v.Get("hash").String(),
|
||||
BlockNum: num,
|
||||
Timestamp: time.Unix(timestamp.Int64(), 0),
|
||||
TradeType: model.OrderTradeTypeUsdtPolygon,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -157,7 +102,7 @@ func polygonProcessBlock(n any) {
|
||||
return
|
||||
}
|
||||
|
||||
polygonUsdtTransferQueue.In <- transfers
|
||||
transferQueue.In <- transfers
|
||||
}
|
||||
|
||||
func polygonBlockScan(time.Duration) {
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
package monitor
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||
"github.com/smallnest/chanx"
|
||||
"github.com/v03413/bepusdt/app/config"
|
||||
"github.com/v03413/bepusdt/app/help"
|
||||
"github.com/v03413/bepusdt/app/model"
|
||||
"github.com/v03413/bepusdt/app/notify"
|
||||
"github.com/v03413/bepusdt/app/telegram"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type transfer struct {
|
||||
TxHash string
|
||||
Amount float64
|
||||
FromAddress string
|
||||
RecvAddress string
|
||||
Timestamp time.Time
|
||||
TradeType string
|
||||
BlockNum int64
|
||||
}
|
||||
|
||||
var transferQueue = chanx.NewUnboundedChan[[]transfer](context.Background(), 30) // 交易转账队列
|
||||
var notOrderQueue = chanx.NewUnboundedChan[[]transfer](context.Background(), 30) // 非订单队列
|
||||
|
||||
func init() {
|
||||
RegisterSchedule(time.Second, orderTransferHandle)
|
||||
RegisterSchedule(time.Second, notOrderTransferHandle)
|
||||
}
|
||||
|
||||
func orderTransferHandle(time.Duration) {
|
||||
for {
|
||||
select {
|
||||
case transfers := <-transferQueue.Out:
|
||||
var other = make([]transfer, 0)
|
||||
var orders = getAllWaitingOrders()
|
||||
for _, t := range transfers {
|
||||
// 计算交易金额
|
||||
var amount, quant = parseTransAmount(t.Amount)
|
||||
|
||||
// 判断金额是否在允许范围内
|
||||
if !inPaymentAmountRange(amount) {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
// 判断是否存在对应订单
|
||||
o, ok := orders[fmt.Sprintf("%s%v%s", t.RecvAddress, quant, t.TradeType)]
|
||||
if !ok {
|
||||
other = append(other, t)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
// 有效期检测
|
||||
if !o.CreatedAt.Before(t.Timestamp) || !o.ExpiredAt.After(t.Timestamp) {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
// 标记成功
|
||||
o.MarkSuccess(t.BlockNum, t.FromAddress, t.TxHash, t.Timestamp)
|
||||
|
||||
go notify.Handle(o) // 通知订单支付成功
|
||||
go telegram.SendTradeSuccMsg(o) // TG发送订单信息
|
||||
}
|
||||
|
||||
if len(other) > 0 {
|
||||
notOrderQueue.In <- other
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func notOrderTransferHandle(time.Duration) {
|
||||
for {
|
||||
select {
|
||||
case transfers := <-notOrderQueue.Out:
|
||||
handleOtherNotify(transfers)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func handleOtherNotify(transfers []transfer) {
|
||||
var was []model.WalletAddress
|
||||
|
||||
model.DB.Where("status = ? and other_notify = ?", model.StatusEnable, model.OtherNotifyEnable).Find(&was)
|
||||
|
||||
for _, wa := range was {
|
||||
if wa.Chain == model.WaChainPolygon {
|
||||
wa.Address = strings.ToLower(wa.Address)
|
||||
}
|
||||
|
||||
for _, t := range transfers {
|
||||
if t.RecvAddress != wa.Address && t.FromAddress != wa.Address {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
var amount, quant = parseTransAmount(t.Amount)
|
||||
if !inPaymentAmountRange(amount) {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
if !model.IsNeedNotifyByTxid(t.TxHash) {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
var url = "https://tronscan.org/#/transaction/" + t.TxHash
|
||||
if t.TradeType == model.OrderTradeTypeUsdtPolygon {
|
||||
url = "https://polygonscan.com/tx/" + t.TxHash
|
||||
}
|
||||
|
||||
var title = "收入"
|
||||
if t.RecvAddress != wa.Address {
|
||||
title = "支出"
|
||||
}
|
||||
|
||||
var text = fmt.Sprintf(
|
||||
"#账户%s #非订单交易\n---\n```\n💲交易数额:%v \n💍交易类别:"+strings.ToUpper(t.TradeType)+"\n⏱️交易时间:%v\n✅接收地址:%v\n🅾️发送地址:%v```\n",
|
||||
title,
|
||||
quant,
|
||||
t.Timestamp.Format(time.DateTime),
|
||||
help.MaskAddress(t.RecvAddress),
|
||||
help.MaskAddress(t.FromAddress),
|
||||
)
|
||||
|
||||
var chatId, err = strconv.ParseInt(config.GetTgBotNotifyTarget(), 10, 64)
|
||||
if err != nil {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
var msg = tgbotapi.NewMessage(chatId, text)
|
||||
msg.ParseMode = tgbotapi.ModeMarkdown
|
||||
msg.ReplyMarkup = tgbotapi.InlineKeyboardMarkup{
|
||||
InlineKeyboard: [][]tgbotapi.InlineKeyboardButton{
|
||||
{
|
||||
tgbotapi.NewInlineKeyboardButtonURL("📝查看交易明细", url),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
var record = model.NotifyRecord{Txid: t.TxHash}
|
||||
model.DB.Create(&record)
|
||||
|
||||
go telegram.SendMsg(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
-155
@@ -14,7 +14,6 @@ import (
|
||||
"github.com/v03413/bepusdt/app/help"
|
||||
"github.com/v03413/bepusdt/app/log"
|
||||
"github.com/v03413/bepusdt/app/model"
|
||||
"github.com/v03413/bepusdt/app/notify"
|
||||
"github.com/v03413/bepusdt/app/telegram"
|
||||
"github.com/v03413/tronprotocol/api"
|
||||
"github.com/v03413/tronprotocol/core"
|
||||
@@ -27,7 +26,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// 交易所在区块高度和当前区块高度差值超过20,说明此交易已经被网络确认
|
||||
// 暂且认为交易所在区块高度和当前区块高度差值超过20,说明此交易已经被网络确认
|
||||
const blockHeightNumConfirmedSub = 20
|
||||
|
||||
// usdt trc20 contract address 41a614f803b6fd780986a42c78ec9c7f77e6ded13c TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t
|
||||
@@ -45,26 +44,17 @@ type resource struct {
|
||||
ResourceCode core.ResourceCode
|
||||
}
|
||||
|
||||
type transfer struct {
|
||||
ID string
|
||||
Amount float64
|
||||
FromAddress string
|
||||
RecvAddress string
|
||||
Timestamp time.Time
|
||||
TradeType string
|
||||
}
|
||||
|
||||
type usdtTrc20TransferRaw struct {
|
||||
RecvAddress string
|
||||
Amount float64
|
||||
}
|
||||
|
||||
func init() {
|
||||
RegisterSchedule(time.Second*3, BlockScanStart)
|
||||
RegisterSchedule(time.Second*3, tronBlockScan)
|
||||
}
|
||||
|
||||
// BlockScanStart 区块扫描
|
||||
func BlockScanStart(duration time.Duration) {
|
||||
// tronBlockScan 区块扫描
|
||||
func tronBlockScan(duration time.Duration) {
|
||||
var node = config.GetTronGrpcNode()
|
||||
log.Info("区块扫描启动:", node)
|
||||
|
||||
@@ -97,22 +87,27 @@ func BlockScanStart(duration time.Duration) {
|
||||
|
||||
atomic.AddUint64(&config.BlockScanSucc, 1)
|
||||
|
||||
var nowBlockHeight = nowBlock.BlockHeader.RawData.Number
|
||||
if config.GetTradeConfirmed() {
|
||||
nowBlockHeight = nowBlockHeight - blockHeightNumConfirmedSub
|
||||
}
|
||||
|
||||
if currentBlockHeight == 0 { // 初始化当前区块高度
|
||||
|
||||
currentBlockHeight = nowBlock.BlockHeader.RawData.Number - 1
|
||||
currentBlockHeight = nowBlockHeight - 1
|
||||
}
|
||||
|
||||
// 连续区块
|
||||
var sub = nowBlock.BlockHeader.RawData.Number - currentBlockHeight
|
||||
var sub = nowBlockHeight - currentBlockHeight
|
||||
if sub == 1 {
|
||||
parseBlockTrans(nowBlock, nowBlock.BlockHeader.RawData.Number)
|
||||
parseBlockTrans(nowBlock, nowBlockHeight)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
// 如果当前区块高度和上次扫描的区块高度差值超过1,说明存在区块丢失
|
||||
var endBlockHeight = nowBlockHeight
|
||||
var startBlockHeight = currentBlockHeight + 1
|
||||
var endBlockHeight = nowBlock.BlockHeader.RawData.Number
|
||||
|
||||
// 扫描丢失的区块
|
||||
var ctx2, cancel2 = context.WithTimeout(context.Background(), time.Second*3)
|
||||
@@ -197,12 +192,13 @@ func parseBlockTrans(block *api.BlockExtention, nowHeight int64) {
|
||||
}
|
||||
|
||||
transfers = append(transfers, transfer{
|
||||
ID: id,
|
||||
TxHash: id,
|
||||
Amount: float64(foo.Amount),
|
||||
FromAddress: base58CheckEncode(foo.OwnerAddress),
|
||||
RecvAddress: base58CheckEncode(foo.ToAddress),
|
||||
Timestamp: timestamp,
|
||||
TradeType: model.OrderTradeTypeTronTrx,
|
||||
BlockNum: nowHeight,
|
||||
})
|
||||
|
||||
continue
|
||||
@@ -217,7 +213,7 @@ func parseBlockTrans(block *api.BlockExtention, nowHeight int64) {
|
||||
continue
|
||||
}
|
||||
|
||||
var transItem = transfer{Timestamp: timestamp, ID: id, FromAddress: base58CheckEncode(foo.OwnerAddress)}
|
||||
var transItem = transfer{Timestamp: timestamp, TxHash: id, FromAddress: base58CheckEncode(foo.OwnerAddress)}
|
||||
var reader = bytes.NewReader(foo.GetData())
|
||||
if !bytes.Equal(foo.GetContractAddress(), usdtTrc20ContractAddress) { // usdt trc20 contract
|
||||
|
||||
@@ -234,6 +230,7 @@ func parseBlockTrans(block *api.BlockExtention, nowHeight int64) {
|
||||
transItem.TradeType = model.OrderTradeTypeUsdtTrc20
|
||||
transItem.Amount = trc20Contract.Amount
|
||||
transItem.RecvAddress = trc20Contract.RecvAddress
|
||||
transItem.BlockNum = nowHeight
|
||||
|
||||
transfers = append(transfers, transItem)
|
||||
}
|
||||
@@ -241,7 +238,7 @@ func parseBlockTrans(block *api.BlockExtention, nowHeight int64) {
|
||||
}
|
||||
|
||||
if len(transfers) > 0 {
|
||||
handleOtherNotify(handleOrderTransaction(block.GetBlockHeader().GetRawData().GetNumber(), nowHeight, transfers))
|
||||
transferQueue.In <- transfers
|
||||
}
|
||||
|
||||
if len(resources) > 0 {
|
||||
@@ -288,140 +285,6 @@ func parseUsdtTrc20Contract(reader *bytes.Reader) usdtTrc20TransferRaw {
|
||||
return usdtTrc20TransferRaw{RecvAddress: toAddress, Amount: float64(amount)}
|
||||
}
|
||||
|
||||
// handleOrderTransaction 处理支付交易
|
||||
func handleOrderTransaction(refBlockNum, nowHeight int64, transfers []transfer) []transfer {
|
||||
var orders = getAllWaitingOrders()
|
||||
var notOrderTransfers []transfer
|
||||
|
||||
for _, t := range transfers {
|
||||
// 计算交易金额
|
||||
var amount, quant = parseTransAmount(t.Amount)
|
||||
|
||||
// 判断金额是否在允许范围内
|
||||
if !inPaymentAmountRange(amount) {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
// 判断是否存在对应订单
|
||||
order, isOrder := orders[fmt.Sprintf("%s%v%s", t.RecvAddress, quant, t.TradeType)]
|
||||
if !isOrder {
|
||||
notOrderTransfers = append(notOrderTransfers, t)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
// 判断时间是否在有效期内
|
||||
if t.Timestamp.Unix() < order.CreatedAt.Unix() || t.Timestamp.Unix() > order.ExpiredAt.Unix() {
|
||||
// 已失效
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
// 更新订单交易信息
|
||||
order.OrderUpdateTxInfo(refBlockNum, t.FromAddress, t.ID, t.Timestamp)
|
||||
}
|
||||
|
||||
for _, order := range orders {
|
||||
if order.RefBlockNum == 0 || order.TradeHash == "" {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
// 判断交易是否需要被确认
|
||||
var confirmedSub int64 = 0
|
||||
if config.GetTradeConfirmed() {
|
||||
|
||||
confirmedSub = blockHeightNumConfirmedSub
|
||||
}
|
||||
|
||||
if nowHeight-order.RefBlockNum <= confirmedSub {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
order.MarkSuccess()
|
||||
|
||||
go notify.Handle(order) // 通知订单支付成功
|
||||
go telegram.SendTradeSuccMsg(order) // TG发送订单信息
|
||||
}
|
||||
|
||||
return notOrderTransfers
|
||||
}
|
||||
|
||||
// handleOtherNotify 处理其他通知
|
||||
func handleOtherNotify(items []transfer) {
|
||||
var ads []model.WalletAddress
|
||||
var tx = model.DB.Where("status = ? and other_notify = ?", model.StatusEnable, model.OtherNotifyEnable).Find(&ads)
|
||||
if tx.RowsAffected <= 0 {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
for _, wa := range ads {
|
||||
for _, trans := range items {
|
||||
if trans.RecvAddress != wa.Address && trans.FromAddress != wa.Address {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
var amount, quant = parseTransAmount(trans.Amount)
|
||||
var detailUrl = "https://tronscan.org/#/transaction/" + trans.ID
|
||||
if !inPaymentAmountRange(amount) {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
if !model.IsNeedNotifyByTxid(trans.ID) {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
var title = "收入"
|
||||
if trans.RecvAddress != wa.Address {
|
||||
title = "支出"
|
||||
}
|
||||
|
||||
var transferUnit = "USDT.TRC20"
|
||||
var transferType = "USDT"
|
||||
if trans.TradeType == model.OrderTradeTypeTronTrx {
|
||||
transferUnit = "TRX"
|
||||
transferType = "TRX"
|
||||
}
|
||||
|
||||
var text = fmt.Sprintf(
|
||||
"#账户%s #非订单交易 #"+transferType+"\n---\n```\n💲交易数额:%v "+transferUnit+"\n⏱️交易时间:%v\n✅接收地址:%v\n🅾️发送地址:%v```\n",
|
||||
title,
|
||||
quant,
|
||||
trans.Timestamp.Format(time.DateTime),
|
||||
help.MaskAddress(trans.RecvAddress),
|
||||
help.MaskAddress(trans.FromAddress),
|
||||
)
|
||||
|
||||
var chatId, err = strconv.ParseInt(config.GetTgBotNotifyTarget(), 10, 64)
|
||||
if err != nil {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
var msg = tgbotapi.NewMessage(chatId, text)
|
||||
msg.ParseMode = tgbotapi.ModeMarkdown
|
||||
msg.ReplyMarkup = tgbotapi.InlineKeyboardMarkup{
|
||||
InlineKeyboard: [][]tgbotapi.InlineKeyboardButton{
|
||||
{
|
||||
tgbotapi.NewInlineKeyboardButtonURL("📝查看交易明细", detailUrl),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
var _record = model.NotifyRecord{Txid: trans.ID}
|
||||
model.DB.Create(&_record)
|
||||
|
||||
go telegram.SendMsg(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// handleResourceNotify 处理资源通知
|
||||
func handleResourceNotify(items []resource) {
|
||||
var ads []model.WalletAddress
|
||||
|
||||
@@ -32,12 +32,12 @@ func cmdStartHandle() {
|
||||
var inlineBtn [][]tgbotapi.InlineKeyboardButton
|
||||
if model.DB.Find(&was).Error == nil {
|
||||
for _, wa := range was {
|
||||
var _address = fmt.Sprintf("[✅已启用] %s", wa.Address)
|
||||
var text = fmt.Sprintf("[✅已启用] %s", help.MaskAddress(wa.Address))
|
||||
if wa.Status == model.StatusDisable {
|
||||
_address = fmt.Sprintf("[❌已禁用] %s", wa.Address)
|
||||
text = fmt.Sprintf("[❌已禁用] %s", help.MaskAddress(wa.Address))
|
||||
}
|
||||
|
||||
inlineBtn = append(inlineBtn, tgbotapi.NewInlineKeyboardRow(tgbotapi.NewInlineKeyboardButtonData(_address, fmt.Sprintf("%s|%v", cbAddress, wa.ID))))
|
||||
inlineBtn = append(inlineBtn, tgbotapi.NewInlineKeyboardRow(tgbotapi.NewInlineKeyboardButtonData(text, fmt.Sprintf("%s|%v", cbAddress, wa.ID))))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package app
|
||||
|
||||
// Version 版本号说明 1.0.0 代表主版本号.功能版本号.修订号
|
||||
const Version = "1.17.3"
|
||||
const Version = "1.17.4"
|
||||
|
||||
Reference in New Issue
Block a user