Skip to content

Commit

Permalink
fix: fixed logging position
Browse files Browse the repository at this point in the history
  • Loading branch information
bcsainju committed Jun 17, 2024
1 parent c0921ec commit 68c3757
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions relayer/chains/steller/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@ func (p *Provider) sendCallTransaction(callArgs xdr.InvokeContractArgs) (*horizo
}
simtxe, err := simtx.Base64()
if err != nil {
p.log.Warn("tx simulation failed", zap.Any("code", simtx))
return nil, err
}
simres, err := p.client.SimulateTransaction(simtxe)
if err != nil {
p.log.Warn("tx simulation failed", zap.Any("code", simtx))
return nil, err
}
if simres.RestorePreamble != nil {
p.log.Info("Need to restore from archived state")
if err := p.handleArchivalState(simres, &sourceAccount); err != nil {
Expand Down Expand Up @@ -117,10 +120,6 @@ func (p *Provider) sendCallTransaction(callArgs xdr.InvokeContractArgs) (*horizo
return nil, err
}
}
if err != nil {
return nil, err
}

var sorobanTxnData xdr.SorobanTransactionData
if err := xdr.SafeUnmarshalBase64(simres.TransactionDataXDR, &sorobanTxnData); err != nil {
return nil, err
Expand Down

0 comments on commit 68c3757

Please sign in to comment.