mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
Shared money input should respond to change in currency (#654)
* Add step method to currency * Change amount placeholder and step, when currency select change * Lint * Add test with auth * Extract request to specific service
This commit is contained in:
parent
c46662c99f
commit
5be1ced19e
10 changed files with 63 additions and 6 deletions
|
@ -58,6 +58,10 @@ class Money::Currency
|
|||
@default_precision = currency_data["default_precision"]
|
||||
end
|
||||
|
||||
def step
|
||||
(1.0/10**default_precision)
|
||||
end
|
||||
|
||||
def <=>(other)
|
||||
return nil unless other.is_a?(Money::Currency)
|
||||
@iso_code <=> other.iso_code
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue