Description
The test for sending a tip verifies the result is (ok u0) and that there are 2 events, but does not verify the actual STX amounts transferred. For a 1,000,000 uSTX tip with a 0.5% fee, the events should show a 995,000 uSTX transfer to the recipient and a 5,000 uSTX transfer to the contract owner. These amounts are not validated.
File
tests/tipstream.test.ts, lines 12-23
Suggested Fix
Extract individual STX transfer events and verify:
- Event 1: sender is wallet1, recipient is wallet2, amount is 995000
- Event 2: sender is wallet1, recipient is deployer (contract owner), amount is 5000
This ensures the fee calculation and distribution work correctly.