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
2 changes: 2 additions & 0 deletions pkg/event/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ func GetErrorCodeFromError(err error) ErrorCode {
return ErrorCodeContextCancelled
case contains(errStr, "invalid signature from initiator"):
return ErrorCodeInvalidInitiatorSignature
case contains(errStr, "duplicate"):
return ErrorCodeSessionDuplicate
default:
return ErrorCodeUnknown
}
Expand Down
9 changes: 9 additions & 0 deletions pkg/eventconsumer/event_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,15 @@ func (ec *eventConsumer) consumeTxSigningEvent() error {

// Check for duplicate session and track if new
if ec.checkDuplicateSession(msg.WalletID, msg.TxID) {
duplicateErr := fmt.Errorf("duplicate signing request detected for walletID=%s txID=%s", msg.WalletID, msg.TxID)
ec.handleSigningSessionError(
msg.WalletID,
msg.TxID,
msg.NetworkInternalCode,
duplicateErr,
"Duplicate session",
natMsg,
)
return
}

Expand Down
Loading