1
This commit is contained in:
parent
b82844d84c
commit
a9fa18e747
@ -53,8 +53,8 @@ func (this *RechargeApi) Buy(c *gin.Context) {
|
|||||||
f5.RspErr(c, 1, err.Error())
|
f5.RspErr(c, 1, err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
currencyMeta := mt.Table.Contract.GetByNetIdName(reqJson.NetId, "TestToken")
|
currencyContractMeta := mt.Table.Contract.GetByNetIdName(reqJson.NetId, "TestToken")
|
||||||
if currencyMeta == nil {
|
if currencyContractMeta == nil {
|
||||||
f5.RspErr(c, 2, "server internal error")
|
f5.RspErr(c, 2, "server internal error")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -97,8 +97,8 @@ func (this *RechargeApi) Buy(c *gin.Context) {
|
|||||||
"account_address": reqJson.AccountAddress,
|
"account_address": reqJson.AccountAddress,
|
||||||
"passport_address": passportAddress,
|
"passport_address": passportAddress,
|
||||||
"amount": price,
|
"amount": price,
|
||||||
"currency_name": currencyMeta.GetName(),
|
"currency_name": currencyContractMeta.GetName(),
|
||||||
"currency_address": currencyMeta.GetAddress(),
|
"currency_address": currencyContractMeta.GetAddress(),
|
||||||
}
|
}
|
||||||
jsonRspObj := &struct {
|
jsonRspObj := &struct {
|
||||||
ErrCode int32 `json:"errcode"`
|
ErrCode int32 `json:"errcode"`
|
||||||
@ -130,8 +130,8 @@ func (this *RechargeApi) Buy(c *gin.Context) {
|
|||||||
reqJson.NetId,
|
reqJson.NetId,
|
||||||
reqJson.AccountAddress,
|
reqJson.AccountAddress,
|
||||||
passportAddress,
|
passportAddress,
|
||||||
currencyMeta.GetName(),
|
currencyContractMeta.GetName(),
|
||||||
currencyMeta.GetAddress(),
|
currencyContractMeta.GetAddress(),
|
||||||
goodsMeta.GetId(),
|
goodsMeta.GetId(),
|
||||||
itemNum,
|
itemNum,
|
||||||
price,
|
price,
|
||||||
|
@ -20,3 +20,7 @@ func (this *RechargeCurrencyTable) PostInit1() {
|
|||||||
panic("无法读取recharge_currency.json")
|
panic("无法读取recharge_currency.json")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *RechargeCurrencyTable) Get() *RechargeCurrency {
|
||||||
|
return this.selfConf
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user