Skip to content

Commit

Permalink
fix(zetaclient): ensure fallbackTx is not nil (#3632)
Browse files Browse the repository at this point in the history
* fix(zetaclient): ensure fallbackTx is not nil

* make error check a bit more strict
  • Loading branch information
gartnera authored Mar 5, 2025
1 parent 0ff3d38 commit 8e1d348
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zetaclient/chains/solana/signer/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,9 @@ func (signer *Signer) broadcastOutbound(
if err != nil {
// in case it is not failure due to nonce mismatch, replace tx with fallback tx
// probably need a better way to do this, but currently this is the only error to tolerate like this
if !strings.Contains(err.Error(), "NonceMismatch") {
errStr := err.Error()
if strings.Contains(errStr, "Error processing Instruction") && !strings.Contains(errStr, "NonceMismatch") &&
fallbackTx != nil {
tx = fallbackTx
}
logger.Warn().Err(err).Fields(lf).Msgf("SendTransactionWithOpts failed")
Expand Down

0 comments on commit 8e1d348

Please sign in to comment.