subtract debits from cake balance

This commit is contained in:
João Geonizeli
2021-09-18 16:08:49 -03:00
parent fb957803cc
commit 698befd7aa
6 changed files with 27 additions and 9 deletions

View File

@@ -33,6 +33,9 @@ class StakeOrder < ApplicationRecord
super & ["pool_name", "amount"]
end
scope :add, -> { where("amount > 0") }
scope :remove, -> { where("amount < 0") }
private
def notification_message