bitsy-bitcoin 0.8.4 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/filterers/bitsy/payment_depot_filterer.rb +13 -0
- data/app/models/bitsy/payment_depot.rb +6 -2
- data/app/models/bitsy/payment_transaction.rb +4 -0
- data/app/serializers/bitsy/payment_depot_serializer.rb +4 -0
- data/lib/bitsy.rb +1 -0
- data/lib/bitsy/version.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adab618db67cc442d07bd8aae043d23f49de69fd
|
4
|
+
data.tar.gz: e2feaaffeec1dc22b19d3b7129aa6b8fa01199b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceb557ffffe7345b4843d315c341191626327806a5660d907bac3e1ee32e6b3a9b0afb3c038977964552deed2c4533788e940639dc1f8db2d08eecd30d170c77
|
7
|
+
data.tar.gz: 6dd64ca2c5075c0b479e32165d7a0c6911cad75efed752ac2ad5b89d39d479d5da35b992ec9b6c34920278d3016dd9a87317927dac5c3b5234069f967866c637
|
@@ -104,14 +104,18 @@ module Bitsy
|
|
104
104
|
self.uuid
|
105
105
|
end
|
106
106
|
|
107
|
+
def forwarding_transaction_fee
|
108
|
+
total_received_amount - total_tax_sent - total_owner_sent
|
109
|
+
end
|
110
|
+
|
107
111
|
private
|
108
112
|
|
109
113
|
def tax_transactions
|
110
|
-
self.transactions.
|
114
|
+
self.transactions.debits.tax
|
111
115
|
end
|
112
116
|
|
113
117
|
def owner_transactions
|
114
|
-
self.transactions.
|
118
|
+
self.transactions.debits.non_tax
|
115
119
|
end
|
116
120
|
|
117
121
|
def set_uuid
|
@@ -20,6 +20,10 @@ module Bitsy
|
|
20
20
|
scope :non_tax, lambda { where('payment_type != ?', 'tax') }
|
21
21
|
scope :for_forwarding, -> { safely_confirmed.not_forwarded.received }
|
22
22
|
scope :credits, -> { received }
|
23
|
+
scope :debits, -> {
|
24
|
+
forwarding_transaction_id = arel_table[:forwarding_transaction_id]
|
25
|
+
where(forwarding_transaction_id.not_eq(nil))
|
26
|
+
}
|
23
27
|
|
24
28
|
delegate :min_payment, to: :payment_depot, prefix: true
|
25
29
|
delegate :balance, to: :payment_depot, prefix: true
|
data/lib/bitsy.rb
CHANGED
data/lib/bitsy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitsy-bitcoin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ramon Tayag
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '1.0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: filterer
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - '='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.4.1
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - '='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 0.4.1
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: sqlite3
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -313,6 +327,7 @@ files:
|
|
313
327
|
- app/controllers/bitsy/v1/payment_depots_controller.rb
|
314
328
|
- app/controllers/bitsy/v1/syncs_controller.rb
|
315
329
|
- app/controllers/bitsy/v1/truncations_controller.rb
|
330
|
+
- app/filterers/bitsy/payment_depot_filterer.rb
|
316
331
|
- app/helpers/bitsy/application_helper.rb
|
317
332
|
- app/jobs/bitsy/blockchain_notification_job.rb
|
318
333
|
- app/jobs/bitsy/check_payments_job.rb
|