Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bridge/docs/observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ For example, if a customer is complaining that their deposit never bridged, you
- `event_refund_tx_expired_received`: The bridge instance has received TFChain `RefundTransactionExpired` event.
- `refund_skipped`: a refund request skipped by the bridge instance as it has already been refunded.
- `refund_proposed`: a refund has proposed or signed by the bridge instance.
- `refund_postponed`: a refund has postponed due to a problem in sending this transaction to the stellar network and will be retried later.
- `refund_completed`: a refund has completed and received on the target stellar account.

##### Withdraw related
Expand Down
9 changes: 9 additions & 0 deletions bridge/tfchain_bridge/pkg/bridge/refund.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ func (bridge *Bridge) handleRefundReady(ctx context.Context, refundReadyEvent su
return err
}

if len(refund.Signatures) == 0 {
logger.Info().
Str("event_action", "refund_postponed").
Str("event_kind", "event").
Str("category", "refund").
Msg("the refund has been postponed due to the transaction signatures being removed on the TFChain side while the bridge was processing the transaction")
return nil
}

// Todo, retry here?
if err = bridge.wallet.CreateRefundPaymentWithSignaturesAndSubmit(ctx, refund.Target, uint64(refund.Amount), refund.TxHash, refund.Signatures, int64(refund.SequenceNumber)); err != nil {
return err
Expand Down
7 changes: 6 additions & 1 deletion bridge/tfchain_bridge/pkg/bridge/withdraw.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ func (bridge *Bridge) handleWithdrawReady(ctx context.Context, withdrawReady sub
}

if len(burnTx.Signatures) == 0 {
return pkg.ErrNoSignatures
logger.Info().
Str("event_action", "withdraw_postponed").
Str("event_kind", "event").
Str("category", "withdraw").
Msg("the withdraw has been postponed due to the transaction signatures being removed on the TFChain side while the bridge was processing the transaction")
return nil
}

// todo add memo hash
Expand Down