@@ -24,6 +24,7 @@ import org.lfdecentralizedtrust.splice.wallet.store.{
2424import com .digitalasset .canton .HasExecutionContext
2525import com .digitalasset .canton .data .CantonTimestamp
2626import org .lfdecentralizedtrust .splice .codegen .java .splice
27+ import org .lfdecentralizedtrust .splice .codegen .java .splice .amulet .{AppRewardCoupon , ValidatorRewardCoupon }
2728import org .lfdecentralizedtrust .splice .codegen .java .splice .api .token .transferinstructionv1 .TransferInstruction
2829import org .lfdecentralizedtrust .splice .http .v0 .definitions .DamlValueEncoding .members .CompactJson
2930import org .lfdecentralizedtrust .splice .http .v0 .definitions .Transfer .TransferKind
@@ -55,22 +56,33 @@ class WalletTxLogTimeBasedIntegrationTest
5556 .addConfigTransform((_, config) => ConfigTransforms .setAmuletPrice(amuletPrice)(config))
5657 }
5758
59+ override protected lazy val sanityChecksIgnoredRootCreates = Seq (
60+ AppRewardCoupon .TEMPLATE_ID_WITH_PACKAGE_ID ,
61+ ValidatorRewardCoupon .TEMPLATE_ID_WITH_PACKAGE_ID
62+ )
63+
5864 " A wallet" should {
5965
6066 " handle app and validator rewards" taggedAs (org.lfdecentralizedtrust.splice.util.Tags .SpliceAmulet_0_1_14 ) in {
6167 implicit env =>
6268 val (aliceUserParty, bobUserParty) = onboardAliceAndBob()
6369 waitForWalletUser(aliceValidatorWalletClient)
6470 waitForWalletUser(bobValidatorWalletClient)
71+ val aliceValidatorParty = aliceValidatorBackend.getValidatorPartyId()
6572
6673 clue(" Tap to get some amulets" ) {
6774 aliceWalletClient.tap(100.0 )
6875 aliceValidatorWalletClient.tap(100.0 )
6976 }
7077
7178 actAndCheck(
72- " Alice transfers some CC to Bob" ,
73- p2pTransfer(aliceWalletClient, bobWalletClient, bobUserParty, 40.0 ),
79+ " Alice transfers some CC to Bob and create rewards" , {
80+ p2pTransfer(aliceWalletClient, bobWalletClient, bobUserParty, 40.0 )
81+ createRewards(
82+ validatorRewards = Seq ((aliceUserParty, 0.43 )),
83+ appRewards = Seq ((aliceValidatorParty, 0.43 , false )),
84+ )
85+ }
7486 )(
7587 " Bob has received the CC" ,
7688 _ => bobWalletClient.balance().unlockedQty should be > BigDecimal (39.0 ),
0 commit comments