mirror of
https://github.com/status-im/status-go.git
synced 2025-02-16 16:56:53 +00:00
Default to sent if confirmations not enabled
This commit is contained in:
parent
272342fb6b
commit
1d752c087f
@ -189,6 +189,12 @@ func (m *EnvelopesMonitor) handleEventEnvelopeSent(event types.EnvelopeEvent) {
|
||||
}
|
||||
m.batches[event.Batch][event.Hash] = struct{}{}
|
||||
m.logger.Debug("waiting for a confirmation", zap.String("batch", event.Batch.String()))
|
||||
} else {
|
||||
m.logger.Debug("confirmation not expected, marking as sent")
|
||||
m.envelopes[event.Hash] = EnvelopeSent
|
||||
if m.handler != nil {
|
||||
m.handler.EnvelopeSent(m.identifiers[event.Hash])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ func (s *EnvelopesMonitorSuite) TestEnvelopePosted() {
|
||||
Hash: testHash,
|
||||
})
|
||||
s.Contains(s.monitor.envelopes, testHash)
|
||||
s.Equal(EnvelopePosted, s.monitor.envelopes[testHash])
|
||||
s.Equal(EnvelopeSent, s.monitor.envelopes[testHash])
|
||||
}
|
||||
|
||||
func (s *EnvelopesMonitorSuite) TestConfirmedWithAcknowledge() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user