Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

Point the Wise sandbox at Wise's current host (#4458)

Yong Cong Sin445b668d26f2
diff --git a/app/models/provider/wise.rb b/app/models/provider/wise.rb
index 2bfb67ac24..c2660ccb57 100644
--- a/app/models/provider/wise.rb
+++ b/app/models/provider/wise.rb
@@ -5,7 +5,7 @@ class Provider::Wise
extend SslConfigurable
LIVE_BASE_URL = "https://api.wise.com"
- SANDBOX_BASE_URL = "https://api.sandbox.transferwise.tech"
+ SANDBOX_BASE_URL = "https://api.wise-sandbox.com"
# Wise caps a single balance-statement request at 469 days; chunk at 468 to
# stay safely within the limit while covering the full requested range.
MAX_STATEMENT_DAYS = 468
diff --git a/config/locales/views/wise_items/ca.yml b/config/locales/views/wise_items/ca.yml
index 69f275a812..59439faac2 100644
--- a/config/locales/views/wise_items/ca.yml
+++ b/config/locales/views/wise_items/ca.yml
@@ -23,7 +23,7 @@ ca:
disconnect: Desconnecta
disconnect_label: Desconnecta %{name}
disconnect_confirm: Vols desconnectar %{name}? S'eliminaran totes les dades dels comptes sincronitzats.
- sandbox_note_html: Utilitza l'URL base de <strong>sandbox</strong> (<code>https://api.sandbox.transferwise.tech</code>) per fer proves. Defineix <code>WISE_BASE_URL</code> al teu entorn.
+ sandbox_note_html: Utilitza l'URL base de <strong>sandbox</strong> (<code>https://api.wise-sandbox.com</code>) per fer proves. Defineix <code>WISE_BASE_URL</code> al teu entorn.
encryption_warning:
title: El xifratge de la base de dades no està configurat
message: Configura les claus de xifratge d'Active Record abans d'afegir tokens de Wise en producció. Sense xifratge, els tokens s'emmagatzemen en text pla.
diff --git a/config/locales/views/wise_items/de.yml b/config/locales/views/wise_items/de.yml
index 24eeedd1dc..aa519bb27e 100644
--- a/config/locales/views/wise_items/de.yml
+++ b/config/locales/views/wise_items/de.yml
@@ -80,7 +80,7 @@ de:
import_all_history_label: Vollständige Transaktionshistorie importieren
keep_token_placeholder: Leer lassen, um den bisherigen Token zu behalten
not_configured: Nicht eingerichtet
- sandbox_note_html: Nutz zum Testen die <strong>Sandbox</strong>-Basis-URL (<code>https://api.sandbox.transferwise.tech</code>). Setz dafür <code>WISE_BASE_URL</code> in deiner Umgebung.
+ sandbox_note_html: Nutz zum Testen die <strong>Sandbox</strong>-Basis-URL (<code>https://api.wise-sandbox.com</code>). Setz dafür <code>WISE_BASE_URL</code> in deiner Umgebung.
setup_accounts: Konten einrichten
setup_title: 'So richtest du es ein:'
sync: Sync
diff --git a/config/locales/views/wise_items/en.yml b/config/locales/views/wise_items/en.yml
index 09461743d9..d6c671d7c1 100644
--- a/config/locales/views/wise_items/en.yml
+++ b/config/locales/views/wise_items/en.yml
@@ -72,7 +72,7 @@ en:
disconnect: Disconnect
disconnect_label: "Disconnect %{name}"
disconnect_confirm: "Are you sure you want to disconnect %{name}? This will remove all synced account data."
- sandbox_note_html: "Use the <strong>sandbox</strong> base URL (<code>https://api.sandbox.transferwise.tech</code>) for testing. Set <code>WISE_BASE_URL</code> in your environment."
+ sandbox_note_html: "Use the <strong>sandbox</strong> base URL (<code>https://api.wise-sandbox.com</code>) for testing. Set <code>WISE_BASE_URL</code> in your environment."
encryption_warning:
title: Database encryption is not configured
message: Configure Active Record encryption keys before adding Wise tokens in production. Without encryption, tokens are stored in plaintext.
diff --git a/config/locales/views/wise_items/fr.yml b/config/locales/views/wise_items/fr.yml
index dbe475063f..e876d5e68e 100644
--- a/config/locales/views/wise_items/fr.yml
+++ b/config/locales/views/wise_items/fr.yml
@@ -86,7 +86,7 @@ fr:
open_tokens: Accédez à Settings → Connect and manage apps → Developer tools → API tokens
sign_in_html: Visitez %{link} et connectez-vous à votre compte
keep_token_placeholder: Laisser vide pour conserver le jeton actuel
- sandbox_note_html: Utilisez l'URL de base <strong>sandbox</strong> (<code>https://api.sandbox.transferwise.tech</code>)
+ sandbox_note_html: Utilisez l'URL de base <strong>sandbox</strong> (<code>https://api.wise-sandbox.com</code>)
pour les tests. Définissez <code>WISE_BASE_URL</code> dans votre environnement.
setup_accounts: Configurer des comptes
sync: Synchroniser
diff --git a/config/locales/views/wise_items/pl.yml b/config/locales/views/wise_items/pl.yml
index 73bb6609bf..511ab19d92 100644
--- a/config/locales/views/wise_items/pl.yml
+++ b/config/locales/views/wise_items/pl.yml
@@ -76,7 +76,7 @@ pl:
→ API tokens
sign_in_html: Odwiedź %{link} i zaloguj się na swoje konto
keep_token_placeholder: Pozostaw puste, aby zachować bieżący token
- sandbox_note_html: Użyj <strong>sandbox</strong> base URL (<code>https://api.sandbox.transferwise.tech</code>)
+ sandbox_note_html: Użyj <strong>sandbox</strong> base URL (<code>https://api.wise-sandbox.com</code>)
do testowania. Ustaw <code>WISE_BASE_URL</code> w swoim środowisku.
sca:
copied: Skopiowano!
diff --git a/config/locales/views/wise_items/pt-PT.yml b/config/locales/views/wise_items/pt-PT.yml
index 687aba18c4..13cf1b1d2f 100644
--- a/config/locales/views/wise_items/pt-PT.yml
+++ b/config/locales/views/wise_items/pt-PT.yml
@@ -72,7 +72,7 @@ pt-PT:
disconnect: Desligar
disconnect_label: "Desligar %{name}"
disconnect_confirm: "Tem a certeza de que pretende desligar %{name}? Isto irá remover todos os dados de contas sincronizados."
- sandbox_note_html: "Utilize o URL base <strong>sandbox</strong> (<code>https://api.sandbox.transferwise.tech</code>) para testes. Defina <code>WISE_BASE_URL</code> no seu ambiente."
+ sandbox_note_html: "Utilize o URL base <strong>sandbox</strong> (<code>https://api.wise-sandbox.com</code>) para testes. Defina <code>WISE_BASE_URL</code> no seu ambiente."
encryption_warning:
title: A encriptação da base de dados não está configurada
message: Configure as chaves de encriptação do Active Record antes de adicionar tokens da Wise em produção. Sem encriptação, os tokens são armazenados em texto simples.
diff --git a/config/locales/views/wise_items/ru.yml b/config/locales/views/wise_items/ru.yml
index 213d9c20d2..abf15d3603 100644
--- a/config/locales/views/wise_items/ru.yml
+++ b/config/locales/views/wise_items/ru.yml
@@ -23,7 +23,7 @@ ru:
disconnect: Отключить
disconnect_label: Отключить %{name}
disconnect_confirm: Вы уверены, что хотите отключить %{name}? Все синхронизированные данные счетов будут удалены.
- sandbox_note_html: Для тестирования используйте базовый URL <strong>песочницы</strong> (<code>https://api.sandbox.transferwise.tech</code>). Задайте <code>WISE_BASE_URL</code> в окружении.
+ sandbox_note_html: Для тестирования используйте базовый URL <strong>песочницы</strong> (<code>https://api.wise-sandbox.com</code>). Задайте <code>WISE_BASE_URL</code> в окружении.
encryption_warning:
title: Шифрование базы данных не настроено
message: Настройте ключи шифрования Active Record, прежде чем добавлять токены Wise в production. Без шифрования токены хранятся в открытом виде.
diff --git a/config/locales/views/wise_items/tr.yml b/config/locales/views/wise_items/tr.yml
index ff92fb5840..2b77b10acf 100644
--- a/config/locales/views/wise_items/tr.yml
+++ b/config/locales/views/wise_items/tr.yml
@@ -69,7 +69,7 @@ tr:
open_tokens: Settings → Connect and manage apps → Developer tools → API tokens bölümüne gidin
sign_in_html: "%{link} adresini ziyaret edin ve hesabınıza giriş yapın"
keep_token_placeholder: Mevcut token'ı korumak için boş bırakın
- sandbox_note_html: Test için <strong>sandbox</strong> temel URL'sini (<code>https://api.sandbox.transferwise.tech</code>)
+ sandbox_note_html: Test için <strong>sandbox</strong> temel URL'sini (<code>https://api.wise-sandbox.com</code>)
kullanın. Ortamınızda <code>WISE_BASE_URL</code> değerini ayarlayın.
setup_accounts: Hesapları kur
sync: Eşitle
diff --git a/config/locales/views/wise_items/uk.yml b/config/locales/views/wise_items/uk.yml
index b240d26cbe..5b8ec02efb 100644
--- a/config/locales/views/wise_items/uk.yml
+++ b/config/locales/views/wise_items/uk.yml
@@ -79,7 +79,7 @@ uk:
disconnect: Відключити
disconnect_label: "Відключити %{name}"
disconnect_confirm: "Ви впевнені, що хочете відключити %{name}? Це видалить усі синхронізовані дані рахунку."
- sandbox_note_html: "Використовуйте базову URL-адресу <strong>пісочниці</strong> (<code>https://api.sandbox.transferwise.tech</code>) для тестування. Встановіть <code>WISE_BASE_URL</code> у вашому середовищі."
+ sandbox_note_html: "Використовуйте базову URL-адресу <strong>пісочниці</strong> (<code>https://api.wise-sandbox.com</code>) для тестування. Встановіть <code>WISE_BASE_URL</code> у вашому середовищі."
encryption_warning:
title: Шифрування бази даних не налаштовано
message: Налаштуйте ключі шифрування Active Record перед додаванням токенів Wise у виробництві. Без шифрування токени зберігаються у вигляді звичайного тексту.
diff --git a/config/locales/views/wise_items/zh-TW.yml b/config/locales/views/wise_items/zh-TW.yml
index 61e86a99b7..2b4dd224e2 100644
--- a/config/locales/views/wise_items/zh-TW.yml
+++ b/config/locales/views/wise_items/zh-TW.yml
@@ -68,7 +68,7 @@ zh-TW:
disconnect: 中斷連線
disconnect_label: 中斷 %{name}
disconnect_confirm: 確定要中斷 %{name} 的連線嗎?這會移除所有已同步的帳戶資料。
- sandbox_note_html: 測試時請使用 <strong>sandbox</strong> 基礎網址(<code>https://api.sandbox.transferwise.tech</code>)。在環境變數中設定 <code>WISE_BASE_URL</code>。
+ sandbox_note_html: 測試時請使用 <strong>sandbox</strong> 基礎網址(<code>https://api.wise-sandbox.com</code>)。在環境變數中設定 <code>WISE_BASE_URL</code>。
encryption_warning:
title: 資料庫加密未設定
message: 在正式環境加入 Wise Token 之前,請先設定 Active Record 加密金鑰。未加密時 Token 會以明文儲存。
diff --git a/test/models/provider/wise_test.rb b/test/models/provider/wise_test.rb
index f9d8174608..d91dfeacc1 100644
--- a/test/models/provider/wise_test.rb
+++ b/test/models/provider/wise_test.rb
@@ -5,6 +5,17 @@ class Provider::WiseTest < ActiveSupport::TestCase
@provider = Provider::Wise.new("test_token", base_url: "https://api.wise.com")
end
+ # Wise retired the V1 sandbox host, api.sandbox.transferwise.tech, on 30 June
+ # 2026. The provider panel tells testers which host to set as WISE_BASE_URL.
+ test "points the sandbox at Wise's current host, as the panel says in every locale" do
+ assert_equal "https://api.wise-sandbox.com", Provider::Wise::SANDBOX_BASE_URL
+
+ I18n.available_locales.each do |locale|
+ assert_includes I18n.t("wise_items.provider_panel.sandbox_note_html", locale: locale), Provider::Wise::SANDBOX_BASE_URL,
+ "sandbox note in #{locale}"
+ end
+ end
+
test "chunks balance statement requests into windows under the 469-day limit" do
start_date = Date.new(2015, 4, 12)
end_date = Date.new(2018, 4, 30)