feat: add multi-network payment support

- Redesign payment UI with a two-step flow (select coin/network → pay)
  - Add wallet address validation in Telegram bot
  - Rename NetworkEthereum constant from "eth" to "ethereum"
This commit is contained in:
line-6000
2026-04-13 03:52:45 +08:00
parent 32ca778735
commit 5e4d5dfae4
16 changed files with 1459 additions and 827 deletions
+2
View File
@@ -15,6 +15,7 @@ const (
type Orders struct {
TradeId string `gorm:"column:trade_id;uniqueIndex:orders_trade_id_uindex" json:"trade_id"`
OrderId string `gorm:"column:order_id;uniqueIndex:orders_order_id_uindex" json:"order_id"` // the order id is generated by client, and will notify client when order is paid
ParentTradeId string `gorm:"column:parent_trade_id;index:idx_orders_parent_trade_id;default:''" json:"parent_trade_id"`
BlockTransactionId string `gorm:"index:orders_block_transaction_id_index;column:block_transaction_id" json:"block_transaction_id"`
Amount float64 `gorm:"column:amount" json:"amount"`
Currency string `gorm:"column:currency" json:"currency"`
@@ -28,6 +29,7 @@ type Orders struct {
Name string `gorm:"column:name" json:"name"`
CallbackNum int `gorm:"column:callback_num;default:0" json:"callback_num"`
CallBackConfirm int `gorm:"column:callback_confirm;default:2" json:"callback_confirm"`
IsSelected bool `gorm:"column:is_selected;default:false" json:"is_selected"`
PaymentType string `gorm:"column:payment_type" json:"payment_type"`
BaseModel
}
+1 -1
View File
@@ -8,7 +8,7 @@ const (
const (
NetworkTron = "tron"
NetworkSolana = "solana"
NetworkEthereum = "eth"
NetworkEthereum = "ethereum"
)
type WalletAddress struct {