Skip to content

Commit

Permalink
Merge pull request #155 from FigureTechnologies/bug_fix_ext
Browse files Browse the repository at this point in the history
Extension function that converts data class to proto was missing fields.
  • Loading branch information
rchaing-figure authored Jul 25, 2023
2 parents e515381 + 3fa1dbd commit a4ae76b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ fun TxCoinTransferData.toCoinTransferResult() = streamResponse {

fun TxMarkerTransfer.toProto() = markerTransfer {
val data = this@toProto
eventType = data.eventType
blockHeight = data.blockHeight
blockTimestamp = data.blockTimestamp.toInstant().atOffset(ZoneOffset.UTC).toProtoTimestamp()
txHash = data.txHash
amount = data.amount
denom = data.denom
administrator = data.administrator
Expand All @@ -38,8 +40,10 @@ fun TxMarkerTransfer.toProto() = markerTransfer {

fun TxMarkerSupply.toProto() = markerSupply {
val data = this@toProto
eventType = data.eventType.toString()
blockHeight = data.blockHeight
blockTimestamp = data.blockTimestamp.toInstant().atOffset(ZoneOffset.UTC).toProtoTimestamp()
txHash = data.txHash.toString()
coins = data.coins.toString()
denom = data.denom.toString()
amount = data.denom.toString()
Expand Down

0 comments on commit a4ae76b

Please sign in to comment.