I've done something similar--no issues.
Had a refi underway but put an unconditional offer with 10% cash deposit through before the refi was done.
Reimbursed cash by vendor on settlement, and re-paid the deposit with borrowed funds.
Talk to your solicitor. They can write something up.