Skip to content

Commit 1e3dc30

Browse files
committed
Set weight, kind for ValidatorReceivedFaucets
Signed-off-by: Divam <[email protected]>
1 parent 276dc8f commit 1e3dc30

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apps/scan/src/main/scala/org/lfdecentralizedtrust/splice/scan/admin/http/ScanHttpEncodings.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,13 @@ object FaucetProcessor {
854854
license.payload.faucetState.map(_.firstReceivedFor.number.longValue()).orElse(0L),
855855
lastCollectedInRound =
856856
license.payload.faucetState.map(_.lastReceivedFor.number.longValue()).orElse(0L),
857+
weight = license.payload.weight.toScala.map(_.doubleValue()),
858+
kind = license.payload.kind.toScala.map { k =>
859+
k.getConstructor() match {
860+
case "OperatorLicense" => ValidatorReceivedFaucets.Kind.OperatorLicense
861+
case "NonOperatorLicense" => ValidatorReceivedFaucets.Kind.NonOperatorLicense
862+
}
863+
},
857864
)
858865
}.toVector
859866
}

0 commit comments

Comments
 (0)