Riskified interview question

Read code and explain its problems, how to improve it