mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 20:14:08 +00:00
FIX AI categorization & Twelvedata currency (#354)
* FIX AI categorization * FIX twelve data API Looking at api docs we were using the wrong field, currency is in meta tag.
This commit is contained in:
@@ -45,9 +45,8 @@ class Family::AutoCategorizer
|
||||
category_id,
|
||||
source: "ai"
|
||||
)
|
||||
transaction.lock_attr!(:category_id)
|
||||
end
|
||||
|
||||
transaction.lock_attr!(:category_id)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -50,11 +50,9 @@ class Family::AutoMerchantDetector
|
||||
merchant_id,
|
||||
source: "ai"
|
||||
)
|
||||
|
||||
# We lock the attribute so that this Rule doesn't try to run again
|
||||
transaction.lock_attr!(:merchant_id)
|
||||
end
|
||||
|
||||
# We lock the attribute so that this Rule doesn't try to run again
|
||||
transaction.lock_attr!(:merchant_id)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ class Provider::TwelveData < Provider
|
||||
symbol: symbol,
|
||||
date: date.to_date,
|
||||
price: price,
|
||||
currency: parsed.dig("currency"),
|
||||
currency: parsed.dig("meta", "currency") || parsed.dig("currency"),
|
||||
exchange_operating_mic: exchange_operating_mic
|
||||
)
|
||||
end.compact
|
||||
|
||||
Reference in New Issue
Block a user