You can disinfect for the hamster first, then he will get well soon.
Just don't touch his leg too much and don't let him climb anything and just leave him alone while he is sleeping and when your around him, try to be happy because if you get nervous or hopeless, your hamster will feel it...
It may take a while till his foot gets better so don't worry
It may take a while till his foot gets better so don't worry