Skip to content

Commit

Permalink
[SDK] Add spentby to tx history record type (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
bordalix authored Jan 30, 2025
1 parent 1620265 commit c25a347
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/client-sdk/covenantless_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2768,6 +2768,7 @@ func vtxosToTxsCovenantless(
Type: types.TxSent,
CreatedAt: vtxo.CreatedAt,
Settled: true,
SpentBy: sb,
})

}
Expand Down
1 change: 1 addition & 0 deletions pkg/client-sdk/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ type Transaction struct {
Type TxType
Settled bool
CreatedAt time.Time
SpentBy string
}

func (t Transaction) IsRound() bool {
Expand Down
1 change: 1 addition & 0 deletions pkg/client-sdk/wasm/browser/wrappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ func GetTransactionHistoryWrapper() js.Func {
"type": record.Type,
"settled": record.Settled,
"createdAt": record.CreatedAt.Format(time.RFC3339),
"spentBy": record.SpentBy,
})
}
result, err := json.MarshalIndent(rawHistory, "", " ")
Expand Down

0 comments on commit c25a347

Please sign in to comment.