INNER CODE UNIT · TypeScript
refundHistory
argus-sight/refund-swatter-lite · supabase/functions/apple-refund-history/index.ts:98
const refundHistory = data.signedTransactions?.map((signed: string) => {
try {
const parts = signed.split('.')
const payload = JSON.parse(atob(parts[1]))
return payload
} catch (e) {
console.error('Error parsing transaction:', e)
return null
}
}).filter(Boolean) || []
return new Response(
JSON.stringify({ refundHistory }),
{
headers: { ...corsHeaders, 'Content-Type': 'application/json' },
status: 200
}
)