144
144
PushTX ,
145
145
RoyaltyAsset ,
146
146
SelectCoins ,
147
+ SendNotification ,
147
148
SendTransaction ,
148
149
SetWalletResyncOnStartup ,
149
150
SpendClawbackCoins ,
@@ -2621,21 +2622,25 @@ async def test_notification_rpcs(wallet_rpc_environment: WalletRpcTestEnvironmen
2621
2622
env .wallet_2 .node .config ["enable_notifications" ] = True
2622
2623
env .wallet_2 .node .config ["required_notification_amount" ] = 100000000000
2623
2624
async with wallet_2 .wallet_state_manager .new_action_scope (DEFAULT_TX_CONFIG , push = True ) as action_scope :
2624
- tx = await client .send_notification (
2625
- await action_scope .get_puzzle_hash (wallet_2 .wallet_state_manager ),
2626
- b"hello" ,
2627
- uint64 (100000000000 ),
2628
- fee = uint64 (100000000000 ),
2625
+ response = await client .send_notification (
2626
+ SendNotification (
2627
+ target = (await action_scope .get_puzzle_hash (wallet_2 .wallet_state_manager )),
2628
+ message = b"hello" ,
2629
+ amount = uint64 (100000000000 ),
2630
+ fee = uint64 (100000000000 ),
2631
+ push = True ,
2632
+ ),
2633
+ tx_config = DEFAULT_TX_CONFIG ,
2629
2634
)
2630
2635
2631
- assert tx .spend_bundle is not None
2636
+ assert response . tx .spend_bundle is not None
2632
2637
await time_out_assert (
2633
2638
5 ,
2634
2639
full_node_api .full_node .mempool_manager .get_spendbundle ,
2635
- tx .spend_bundle ,
2636
- tx .spend_bundle .name (),
2640
+ response . tx .spend_bundle ,
2641
+ response . tx .spend_bundle .name (),
2637
2642
)
2638
- await farm_transaction (full_node_api , wallet_node , tx .spend_bundle )
2643
+ await farm_transaction (full_node_api , wallet_node , response . tx .spend_bundle )
2639
2644
await time_out_assert (20 , env .wallet_2 .wallet .get_confirmed_balance , uint64 (100000000000 ))
2640
2645
2641
2646
notification = (await client_2 .get_notifications (GetNotifications ())).notifications [0 ]
@@ -2648,21 +2653,25 @@ async def test_notification_rpcs(wallet_rpc_environment: WalletRpcTestEnvironmen
2648
2653
assert [] == (await client_2 .get_notifications (GetNotifications ([notification .id ]))).notifications
2649
2654
2650
2655
async with wallet_2 .wallet_state_manager .new_action_scope (DEFAULT_TX_CONFIG , push = True ) as action_scope :
2651
- tx = await client .send_notification (
2652
- await action_scope .get_puzzle_hash (wallet_2 .wallet_state_manager ),
2653
- b"hello" ,
2654
- uint64 (100000000000 ),
2655
- fee = uint64 (100000000000 ),
2656
+ response = await client .send_notification (
2657
+ SendNotification (
2658
+ target = (await action_scope .get_puzzle_hash (wallet_2 .wallet_state_manager )),
2659
+ message = b"hello" ,
2660
+ amount = uint64 (100000000000 ),
2661
+ fee = uint64 (100000000000 ),
2662
+ push = True ,
2663
+ ),
2664
+ tx_config = DEFAULT_TX_CONFIG ,
2656
2665
)
2657
2666
2658
- assert tx .spend_bundle is not None
2667
+ assert response . tx .spend_bundle is not None
2659
2668
await time_out_assert (
2660
2669
5 ,
2661
2670
full_node_api .full_node .mempool_manager .get_spendbundle ,
2662
- tx .spend_bundle ,
2663
- tx .spend_bundle .name (),
2671
+ response . tx .spend_bundle ,
2672
+ response . tx .spend_bundle .name (),
2664
2673
)
2665
- await farm_transaction (full_node_api , wallet_node , tx .spend_bundle )
2674
+ await farm_transaction (full_node_api , wallet_node , response . tx .spend_bundle )
2666
2675
await time_out_assert (20 , env .wallet_2 .wallet .get_confirmed_balance , uint64 (200000000000 ))
2667
2676
2668
2677
notification = (await client_2 .get_notifications (GetNotifications ())).notifications [0 ]
0 commit comments