1
This commit is contained in:
parent
d92d39e216
commit
675eb5c7be
@ -63,7 +63,6 @@ func (this* goldBullionReturn) returnGold(ds *f5.DataSet) bool {
|
|||||||
}
|
}
|
||||||
contractAddress := contractMeta.GetAddress()
|
contractAddress := contractMeta.GetAddress()
|
||||||
tokenId := ds.GetByName("token_id")
|
tokenId := ds.GetByName("token_id")
|
||||||
tokenId = "1076969088010093"
|
|
||||||
f5.GetSysLog().Info("returnGold net:%d accountId:%s contract_address:%s tokenId: %s",
|
f5.GetSysLog().Info("returnGold net:%d accountId:%s contract_address:%s tokenId: %s",
|
||||||
netId, accountId, contractAddress, tokenId)
|
netId, accountId, contractAddress, tokenId)
|
||||||
{
|
{
|
||||||
@ -77,33 +76,34 @@ func (this* goldBullionReturn) returnGold(ds *f5.DataSet) bool {
|
|||||||
mt.Table.Config.GetById(0).GetChainName(),
|
mt.Table.Config.GetById(0).GetChainName(),
|
||||||
contractAddress,
|
contractAddress,
|
||||||
tokenId)
|
tokenId)
|
||||||
var httpErr error
|
rsp, data, err := q5.HttpGetEx2(url, map[string]string{})
|
||||||
f5.GetHttpCliMgr().SendGoStyleRequest(
|
if err != nil {
|
||||||
|
f5.GetSysLog().Info("returnGold immutable api:%s request error:%s",
|
||||||
|
url,
|
||||||
|
err)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
f5.GetSysLog().Info("returnGold immutable api:%s statusCode:%d body:%s",
|
||||||
url,
|
url,
|
||||||
map[string]string{},
|
rsp.StatusCode,
|
||||||
func (rsp f5.HttpCliResponse) {
|
data)
|
||||||
httpErr = rsp.GetErr()
|
if rsp.StatusCode != 404 {
|
||||||
if rsp.GetErr() != nil {
|
|
||||||
f5.GetSysLog().Info("returnGold immutable api:%s request error:%s",
|
|
||||||
url,
|
|
||||||
rsp.GetErr())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if err := q5.DecodeJson(rsp.GetRawData(), &rspObj); err != nil {
|
|
||||||
f5.GetSysLog().Info("returnGold immutable api:%s decodeJson error:%s",
|
|
||||||
url,
|
|
||||||
err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if httpErr != nil {
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if rspObj.Result.TokenId == tokenId {
|
if rsp.StatusCode == 200 {
|
||||||
f5.GetSysLog().Info("returnGold tokenId:%s exists",
|
if err := q5.DecodeJson(data, &rspObj); err != nil {
|
||||||
tokenId)
|
f5.GetSysLog().Info("returnGold immutable api:%s decodeJson error:%s",
|
||||||
return true
|
url,
|
||||||
|
err)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if rspObj.Result.TokenId == tokenId {
|
||||||
|
f5.GetSysLog().Info("returnGold tokenId:%s exists",
|
||||||
|
tokenId)
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
//return service.ReturnGoldBullion(accountId, netId, tokenId)
|
//return service.ReturnGoldBullion(accountId, netId, tokenId)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user