Scalapay interview question

Explain what could be improved