fixes found in v2 component integration (#667)
fixes found in v2 component integrations Co-authored-by: ftocal <fert1335@gmail.com>
This commit is contained in:
parent
5c31ca35ca
commit
29bb5fd77b
|
@ -126,7 +126,7 @@ func (q *SQS) createEvent(notification *domain.NotificationEvent) *Event {
|
|||
ChainID: uint16(signedVaa.EmitterChain),
|
||||
EmitterAddress: signedVaa.EmitterAddr,
|
||||
Sequence: signedVaa.Sequence,
|
||||
Vaa: []byte(signedVaa.Vaa),
|
||||
Vaa: signedVaa.Vaa,
|
||||
Timestamp: &signedVaa.Timestamp,
|
||||
TxHash: signedVaa.TxHash,
|
||||
}
|
||||
|
|
|
@ -132,12 +132,13 @@ func (s *Repository) UpsertVaa(ctx context.Context, v *vaa.VAA, serializedVaa []
|
|||
Sequence: v.Sequence,
|
||||
GuardianSetIndex: v.GuardianSetIndex,
|
||||
Timestamp: v.Timestamp,
|
||||
Vaa: v.Payload,
|
||||
Vaa: serializedVaa,
|
||||
TxHash: vaaDoc.TxHash,
|
||||
Version: int(v.Version),
|
||||
},
|
||||
}
|
||||
s.afterUpdate(ctx, event)
|
||||
|
||||
err = s.afterUpdate(ctx, event)
|
||||
}
|
||||
|
||||
return err
|
||||
|
|
|
@ -37,9 +37,9 @@ func (p *SNSProducer) Push(ctx context.Context, event *NotificationEvent) error
|
|||
return err
|
||||
}
|
||||
|
||||
groupID := fmt.Sprintf("%d/%s", event.Payload.EmitterChain, event.Payload.EmitterAddr)
|
||||
p.logger.Debug("Publishing signedVaa event", zap.String("groupID", groupID))
|
||||
err = p.producer.SendMessage(ctx, groupID, event.Payload.ID, string(body))
|
||||
deduplicationID := fmt.Sprintf("gossip-event-%s", event.Payload.ID)
|
||||
p.logger.Debug("Publishing signedVaa event", zap.String("groupID", event.Payload.ID))
|
||||
err = p.producer.SendMessage(ctx, event.Payload.ID, deduplicationID, string(body))
|
||||
if err == nil {
|
||||
p.metrics.IncVaaSendNotification(vaa.ChainID(event.Payload.EmitterChain))
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
@ -141,7 +142,7 @@ func (q *SQS) createEvent(notification *domain.NotificationEvent) *Event {
|
|||
ID: plm.ID,
|
||||
ChainID: sdk.ChainID(plm.EmitterChain),
|
||||
EmitterAddress: plm.EmitterAddr,
|
||||
Sequence: plm.Sequence,
|
||||
Sequence: strconv.FormatUint(plm.Sequence, 10),
|
||||
Vaa: plm.Vaa,
|
||||
Timestamp: &plm.Timestamp,
|
||||
TxHash: plm.TxHash,
|
||||
|
|
Loading…
Reference in New Issue