If you assign damage to a unit during Battlefield Phase, enough to kill him, and for this example you have 2 more damage to apply to the capital so that is where you assign it.
If a card is played like Blessing of Valaya, which redirects damage dealt to the unit and this is played between the assign and apply phase, and therefore saves the unit from being destroyed, what happens to the damage assigned to the capital. Does it get cancelled or does it still get applied because enough damage was assigned to the unit to kill it, but was saved by a tactic after damage was assigned?