Refactor get wallet by userid method