Skip to content

Commit 8e1d348

Browse files
authored
fix(zetaclient): ensure fallbackTx is not nil (#3632)
* fix(zetaclient): ensure fallbackTx is not nil * make error check a bit more strict
1 parent 0ff3d38 commit 8e1d348

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

zetaclient/chains/solana/signer/signer.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,9 @@ func (signer *Signer) broadcastOutbound(
317317
if err != nil {
318318
// in case it is not failure due to nonce mismatch, replace tx with fallback tx
319319
// probably need a better way to do this, but currently this is the only error to tolerate like this
320-
if !strings.Contains(err.Error(), "NonceMismatch") {
320+
errStr := err.Error()
321+
if strings.Contains(errStr, "Error processing Instruction") && !strings.Contains(errStr, "NonceMismatch") &&
322+
fallbackTx != nil {
321323
tx = fallbackTx
322324
}
323325
logger.Warn().Err(err).Fields(lf).Msgf("SendTransactionWithOpts failed")

0 commit comments

Comments
 (0)