Skip to content

Commit

Permalink
feat: update token info
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpiotzh committed Sep 14, 2024
1 parent f2b6b35 commit ed134d6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func GetPaymentAddress(payTokenId tables.PayTokenId, paymentAddress string) (str
if _, ok := Cfg.Chain.Bsc.AddrMap[paymentAddress]; ok {
return strings.ToLower(paymentAddress), nil
}
case tables.PayTokenIdMATIC:
case tables.PayTokenIdPOL: //,tables.PayTokenIdMATIC:
if _, ok := Cfg.Chain.Polygon.AddrMap[paymentAddress]; ok {
return strings.ToLower(paymentAddress), nil
}
Expand Down
2 changes: 1 addition & 1 deletion parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (t *ToolParser) initParserPolygon() error {
DbDao: t.dbDao,
CN: t.cn,
ParserType: tables.ParserTypePOLYGON,
PayTokenId: tables.PayTokenIdMATIC,
PayTokenId: tables.PayTokenIdPOL, //tables.PayTokenIdMATIC,
CurrentBlockNumber: 0,
ConcurrencyNum: 10,
ConfirmNum: 10,
Expand Down
5 changes: 3 additions & 2 deletions refund/refund_order.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (t *ToolRefund) doRefund() error {
parserType = tables.ParserTypeETH
case tables.PayTokenIdBNB, tables.PayTokenIdBep20USDT:
parserType = tables.ParserTypeBSC
case tables.PayTokenIdMATIC:
case tables.PayTokenIdPOL: //tables.PayTokenIdMATIC:
parserType = tables.ParserTypePOLYGON
case tables.PayTokenIdTRX, tables.PayTokenIdTrc20USDT:
parserType = tables.ParserTypeTRON
Expand Down Expand Up @@ -196,7 +196,8 @@ func (t *ToolRefund) getParserTypeEvmMap() (map[tables.ParserType]parserTypeEvm,
return nil, fmt.Errorf("NonceAt polygon err: %s", err.Error())
}
parserTypePolygon.nonceMap[strings.ToLower(k)] = nonce
nonceInfo, err := t.DbDao.GetRefundNonce(nonce, k, []tables.PayTokenId{tables.PayTokenIdMATIC})
//nonceInfo, err := t.DbDao.GetRefundNonce(nonce, k, []tables.PayTokenId{tables.PayTokenIdMATIC})
nonceInfo, err := t.DbDao.GetRefundNonce(nonce, k, []tables.PayTokenId{tables.PayTokenIdPOL})
if err != nil {
return nil, fmt.Errorf("GetRefundNonce polygon err: %s[%d][%s]", err.Error(), nonce, k)
} else if nonceInfo.Id > 0 {
Expand Down
1 change: 1 addition & 0 deletions tables/t_order_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const (
PayTokenIdBNB PayTokenId = "bsc_bnb"
PayTokenIdBep20USDT PayTokenId = "bsc_bep20_usdt"
PayTokenIdMATIC PayTokenId = "polygon_matic"
PayTokenIdPOL PayTokenId = "polygon_pol"
PayTokenIdDOGE PayTokenId = "doge_doge"
PayTokenIdDAS PayTokenId = "ckb_das"
PayTokenIdCKB PayTokenId = "ckb_ckb"
Expand Down

0 comments on commit ed134d6

Please sign in to comment.