Here is my code currently it ends up sending all of the value on the script to the caller but I only want it to send 1 ADA. How do I fix this? Is there anyway to create a smaller output to send
purchase :: AsContractError e => MintParams -> Contract w s e ()
purchase mp = do
utxos <- fundsAtAddressGeq valAddress (Ada.lovelaceValueOf 1)
let redeemer = ()
pkh = ownPubKey
tx = collectFromScript utxos redeemer
void (submitTxConstraintsSpending lootBox utxos tx)