normalize osmosis txhash (#777)

Co-authored-by: ftocal <fert1335@gmail.com>
This commit is contained in:
walker-16 2023-10-30 11:23:37 -03:00 committed by GitHub
parent a29fbce237
commit e5282ffb16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -198,16 +198,16 @@ func fetchOsmosisDetail(ctx context.Context, baseUrl string, rateLimiter *time.T
return nil, err
}
var kReponse kujiraResponse
err = json.Unmarshal(response, &kReponse)
var oReponse osmosisResponse
err = json.Unmarshal(response, &oReponse)
if err != nil {
return nil, err
}
if len(kReponse.Result.Txs) == 0 {
if len(oReponse.Result.Txs) == 0 {
return nil, fmt.Errorf("can not found hash for sequence %s, timestamp %s, srcChannel %s, dstChannel %s", sequence, timestamp, srcChannel, dstChannel)
}
return &osmosisTx{txHash: kReponse.Result.Txs[0].Hash}, nil
return &osmosisTx{txHash: strings.ToLower(oReponse.Result.Txs[0].Hash)}, nil
}
type evmosRequest struct {
@ -354,16 +354,16 @@ func fetchKujiraDetail(ctx context.Context, baseUrl string, rateLimiter *time.Ti
return nil, err
}
var oReponse osmosisResponse
err = json.Unmarshal(response, &oReponse)
var kReponse kujiraResponse
err = json.Unmarshal(response, &kReponse)
if err != nil {
return nil, err
}
if len(oReponse.Result.Txs) == 0 {
if len(kReponse.Result.Txs) == 0 {
return nil, fmt.Errorf("can not found hash for sequence %s, timestamp %s, srcChannel %s, dstChannel %s", sequence, timestamp, srcChannel, dstChannel)
}
return &kujiraTx{txHash: strings.ToLower(oReponse.Result.Txs[0].Hash)}, nil
return &kujiraTx{txHash: strings.ToLower(kReponse.Result.Txs[0].Hash)}, nil
}
type WorchainAttributeTxDetail struct {