We are currently returning the amount from the input. This only matches the amount purchased if a user purchased all offered tokens.
What we really want is the amount purchased and the amount paid for that purchase. We are getting the txs in this method already, so the info is available. This is the point of the stack where we should solve this problem.
Note that the historicOffers method is not currently tested.