Sha256: ae7e9fac5fb7e0b2672e113e5ea292e5eb3253d4db7c8ec53cd5361c8896d9f6
Contents?: true
Size: 438 Bytes
Versions: 4
Compression:
Stored size: 438 Bytes
Contents
module Stellar class PathPaymentResult # send_amount returns the actual amount paid for the corresponding # PathPaymentOp to this result. # def send_amount s = success! return s.last.amount if s.offers.blank? source_currency = s.offers.first.currency_send source_offers = s.offers.take_while{|o| o.currency_send == source_currency} source_offers.map(&:amount_send).sum end end end
Version data entries
4 entries across 4 versions & 1 rubygems