PAR-23
Resolve government accounts before personal accounts for unrenting in Realty
/unrent resolves a player's personal account before a government account, so government-owned rentals settle against the wrong account. Government accounts should be resolved first.
Technical notes — Realty moves money through an EconomyProvider abstraction (realty-paper/…/economy/; the Treasury-backed provider is used in prod). transfer(fromId, toId, …) resolves counterparties by UUID, and Treasury's Vault adapter maps a UUID to a PERSONAL account first. In the unrent handler's counterparty resolution, resolve the government account before falling back to the player's personal account (mirror Treasury's getGovernmentAccountByName precedence).
Comments
rian · May 31, 2026, 11:53 AM
This is a bug
tesks · Jun 4, 2026, 9:24 AM
Code context — Realty moves money through an EconomyProvider abstraction (realty-paper/…/economy/, e.g. VaultEconomyProvider; the Treasury-backed provider is used in prod). transfer(fromId, toId, …) resolves counterparties by UUID, and Treasury's Vault adapter maps a UUID to a PERSONAL account first — so on /unrent a government landlord that should receive/refund is resolved as a personal account instead.
Fix: in the unrent handler's counterparty resolution, resolve the government account before falling back to the player's personal account (mirror Treasury's getGovernmentAccountByName precedence). Marked Urgent.
tesks · Jun 4, 2026, 9:19 PM
Verified Planned → Done: RealtyPaperApiImpl.handleUnrentRefund does economyProvider.transfer(landlordId, tenantId, refund, …), and TreasuryEconomyProvider resolves the landlord's account GOVERNMENT > PERSONAL > BUSINESS (documented at lines ~84–104: government entities own both a personal and a government account, and income/refunds must hit the government treasury). On realty main (bf06673), released.
Activity
- tesks commented
- tesks changed status to Status → Done
- tesks description: Description updated
- tesks commented
- tesks assigned Assigned to rian