Stack function to transfer stx in my contract, how can i implement it efficicntly

I have a function to make sure stx is transfered for the the minting process and it looks like this

contract-call? STX-TRANSFER (tuple (recipient (contract-address)) (amount type))

i get error from stack ‘’’ clarinet check

→ contracts\nft-ioia.clar:62:4
(match (contract-call? STX-TRANSFER (tuple (recipient (contract-address)) (amount type)))
^~~~~
(match (contract-call? STX-TRANSFER (tuple (recipient (contract-address)) (amount type)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
((ok (tuple (success true) (result (tuple (amount amount))))) amount)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(else (err “Failed to retrieve payment amount.”))))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x 1 error detected

How can such issue be resolved

1 Like