If your work and training were done in the Islamic branch of the commercial bank and you are not certain about whether the bankâs dealing and transactions were haraam, then there is nothing wrong with your having taken money, especially since the branch had a sharâi committee supervising it.
Similarly, if the bank had started to turn into an Islamic bank and you yourself did not do any haraam work in it, there is nothing wrong with your having taken any money, because it is permissible to work in such a bank.
If it becomes clear to you that this branch was doing riba-based transactions and that there that was nothing to differentiate it from a regular commercial bank, and the money you took is still with you, then you should get rid of it by giving it to the poor and needy or spending it on other charitable causes.
For more information, please see the answer to question no. 81915
And Allah knows best.