Gift is shown sent (on ticker) even though the transaction failed or was cancelled

If transaction failed it stored in the gifts table .on ticker we get
data from the gifts table using setGiftsSent() function ,here we apply
one condition which show only those gifts which has GIFT_STATUS_VALID.