Fixed calculation bug in portfolio view; encapsulated satoshi calculation in function