Skip to content

armgit / maybe

Public Imported from GitHub
0

The personal finance app for everyone

Fix incorrect currency assignment for stock prices #1623 (#1798)

Saleh Almatrafi37aab45c190c
diff --git a/app/models/provider/synth.rb b/app/models/provider/synth.rb
index b7735575..bcb9f345 100644
--- a/app/models/provider/synth.rb
+++ b/app/models/provider/synth.rb
@@ -59,7 +59,7 @@ class Provider::Synth
{
date: price.dig("date"),
price: price.dig("close")&.to_f || price.dig("open")&.to_f,
- currency: price.dig("currency") || "USD"
+ currency: body.dig("currency") || "USD"
}
end
end