return | catapult::observers::MAKE_OBSERVER (HarvestFee, Notification,([mosaicId, percentage, calculator](const auto ¬ification, auto &context) { auto inflationAmount=calculator.getSpotAmount(context.Height);auto totalAmount=notification.TotalFee+inflationAmount;auto beneficiaryAmount=ShouldShareFees(notification.Signer, notification.Beneficiary, percentage) ? Amount(totalAmount.unwrap() *percentage/100) :Amount();auto harvesterAmount=totalAmount - beneficiaryAmount;ApplyFee(notification.Signer, { mosaicId, harvesterAmount }, context);if(Amount() !=beneficiaryAmount) ApplyFee(notification.Beneficiary, { mosaicId, beneficiaryAmount }, context);if(Amount() !=inflationAmount &&NotifyMode::Commit==context.Mode) { model::InflationReceipt receipt(model::Receipt_Type_Inflation, mosaicId, inflationAmount);context.StatementBuilder().addReceipt(receipt);} })) |