diff --git a/app/models/simple_fin_account.rb b/app/models/simple_fin_account.rb index a68bd1dd..732589d8 100644 --- a/app/models/simple_fin_account.rb +++ b/app/models/simple_fin_account.rb @@ -49,7 +49,6 @@ class SimpleFinAccount < ApplicationRecord accountable: TYPE_MAPPING[sf_account_data["type"]].new, subtype: sf_account_data["subtype"], simple_fin_account: sfa, # Explicitly associate back - last_synced_at: Time.current, # Mark as synced upon creation # Set cash_balance similar to how Account.create_and_sync might cash_balance: sfa.available_balance ) diff --git a/app/views/accounts/show/_header.html.erb b/app/views/accounts/show/_header.html.erb index 4d6bd38a..8c92b64b 100644 --- a/app/views/accounts/show/_header.html.erb +++ b/app/views/accounts/show/_header.html.erb @@ -28,7 +28,7 @@ <% end %>
- <% if Rails.env.development? %> + <% if Rails.env.development? && account.plaid_account %> <%= icon( "refresh-cw", as_button: true, @@ -38,8 +38,8 @@ frame: :_top, title: "Refresh all SimpleFIN accounts" ) %> - <% end %> - <% elsif account.simple_fin_account_id.present? %> + <% end %> + <% if account.simple_fin_account_id.present? %> <%= image_tag "simple-fin-logo.svg", class: "h-6 w-auto", title: "Connected via SimpleFIN. This account will auto refresh." %> <%= render "accounts/account_error", account: account, link_to_path: "https://beta-bridge.simplefin.org/my-account", given_title: "This account has issues in SimpleFIN bridge. Update it and then re-sync.", target: :_blank %> <%# Re sync button. Will sync all SimpleFIN accounts %> @@ -51,15 +51,6 @@ disabled: account.syncing?, frame: :_top ) %> - <% else %> - <%= icon( - "refresh-cw", - as_button: true, - size: "sm", - href: sync_account_path(account), - disabled: account.syncing?, - frame: :_top - ) %> <% end %> <%= render "accounts/show/menu", account: account %>