Fix computation of second currency amount

issue3664
review3351002
(transplanted from b81862858d215919a2c3355d4075c656e5ed516b)

--HG--
extra : transplant_source : %B8%18b%85%8D%21Y%19%A2%C35%5D%40u%C6V%E5%EDQk