Australia’s sharemarket has recovered from heavy early losses after US President Donald Trump made a major Iran reversal.