Hi @huw,
Your point is well-taken. In scenarios where the incoming controllers of the receiving account are empty, the newOwner
would solely witness the credit/creation of the new holding. However, they would not be privy to the corresponding holding being debited/archived. To rectify this situation, we could incorporate the newOwner
as choice observers in the following manner:
nonconsuming choice Transfer : ContractId Transferable
-- ^ Transfer a contract to a new owner.
with
actors : Parties
-- ^ Parties authorizing the transfer.
newOwnerAccount : AccountKey
-- ^ Account contract id of the parties to transfer the contract to.
observer newOwnerAccount.owner
controller actors, getLockers this
do
transfer this self arg
I have added a github issue 837 where we can track this.
Please also find the following related forum question:
I hope that helps.
Johan