Sha256: f95f35cda5fe52bf7ece73bf2ab3d24b1f349d083818b769825f7a8b389fc50c
Contents?: true
Size: 447 Bytes
Versions: 15
Compression:
Stored size: 447 Bytes
Contents
module Stellar class PathPaymentStrictReceiveResult # 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_asset = s.offers.first.asset_bought source_offers = s.offers.take_while { |o| o.asset_bought == source_asset } source_offers.map(&:amount_bought).sum end end end
Version data entries
15 entries across 15 versions & 1 rubygems