I need to make a smart contract using Plutus to divide an amount to 2 wallet unequally so I can define custom fees for each transaction. I am using this documentation. What I need is that I would like to split the amount to two unequal amounts and send each to a separate wallet. Assume a user wants to send 7$ to wallet B from his wallet A. The additional fee which I have defined before for each transaction is 2$. using code block below, How can I divide 9$ to 7$ and 2$, then send them to wallets B and C (C is my wallet).
validateSplit :: SplitData -> () -> ScriptContext -> Bool
validateSplit SplitData{recipient1, recipient2, amount} _ ScriptContext{scriptContextTxInfo} =
let half = Ada.divide amount 2 in
Ada.fromValue (valuePaidTo scriptContextTxInfo recipient1) >= half &&
Ada.fromValue (valuePaidTo scriptContextTxInfo recipient2) >= (amount - half)