Skip to content

Commit

Permalink
feat(SPV-916): add xpub_in_ids and xpub_out_ids to TransactionEvent (#…
Browse files Browse the repository at this point in the history
…649)

* feat(SPV-916): add xpub_in_ids and xpub_out_ids to TransactionEvent

* chore(SPV-916): refactor TransactionEvent
  • Loading branch information
pawellewandowski98 authored Jul 30, 2024
1 parent 4fa7f2d commit c19bd23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions engine/db_model_transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ func (m *Transaction) notify() {
UserEvent: models.UserEvent{
XPubID: m.XPubID,
},
TransactionID: m.ID,
Status: m.TxStatus,
TransactionID: m.ID,
Status: m.TxStatus,
XpubOutputValue: m.XpubOutputValue,
})
}
}
5 changes: 3 additions & 2 deletions models/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ type UserEvent struct {
type TransactionEvent struct {
UserEvent `json:",inline"`

TransactionID string `json:"transactionId"`
Status string `json:"status"`
TransactionID string `json:"transactionId"`
Status string `json:"status"`
XpubOutputValue map[string]int64 `json:"xpubOutputValue"`
}

// NOTICE: If you add a new event type, you must also update the Events interface
Expand Down

0 comments on commit c19bd23

Please sign in to comment.