v6.0.2 Release candidate (#3080)
What changed, and why it matters
This is a routine mobile app release candidate (version 6.0.2) for Cake Wallet/Monero.com. The visible changes are mostly user-facing polish: updated changelogs, moving Bitcoin Lightning higher in currency lists, disabling a swap provider for certain tokens, hiding some swap options, and improving how Lightning addresses/invoices are resolved and displayed. There is no explicit security fix described by the vendor, and nothing in the diff clearly points to a vulnerability being patched.
Treat as a normal release-candidate review. The Lightning invoice service is new network-facing code handling user input; it should be reviewed for URL validation, TLS certificate pinning, and robust handling of malicious LNURL responses. Verify that address normalization cannot be abused to redirect swaps to attacker-controlled invoices. No urgent security action is indicated by the commit itself.
Security signals we found
New network service resolves arbitrary user-supplied Lightning addresses (user@domain) via HTTPS LNURL callback
Exchange provider now converts Lightning addresses to Bolt11 invoices before passing to backend
Lightning wallet address initialization now falls back to cached address on error
Settings migration resets user preference for forced DEX providers
No vendor-described security fix or CVE reference present
Evidence from the diff
The commit bumps app versions to 6.0.2, refreshes localized changelogs, and makes several functional tweaks. Notable code changes include: adding a Lightning invoice resolution service (getBolt11FromLightingAddress) that fetches LNURL-pay metadata and callback invoices; normalizing Lightning addresses to Bolt11 invoices in the Exolix exchange provider; reordering CryptoCurrency.all so BTCLN appears earlier; caching and fallback logic for Lightning wallet addresses; removing an automatic Lightning invoice generation path in exchange flow in favor of address-book selection; a settings migration that resets the ‘force decentralized exchanges’ flag; and minor UI/bug fixes (return null instead of implicit void, safer double parsing, try/catch around icon lookup).
Changed components
lib/core/lightning_invoice_service.dartlib/exchange/provider/exolix_exchange_provider.dartlib/view_model/exchange/exchange_view_model.dartcw_bitcoin/lib/electrum_wallet_addresses.dartcw_bitcoin/lib/lightning/lightning_wallet.dartlib/entities/default_settings_migration.dartlib/new-ui/pages/swap_page.dartlib/new-ui/widgets/swap_page/swap_address_selection_modal.dartlib/view_model/send/output.dartInspect captured patch +268 / −155
diff --git a/assets/new-ui/changelog/text/changelog_ar.json b/assets/new-ui/changelog/text/changelog_ar.json
index 0902875..8c33fcf 100644
--- a/assets/new-ui/changelog/text/changelog_ar.json
+++ b/assets/new-ui/changelog/text/changelog_ar.json
@@ -1 +1 @@
-[{"icon":"star","title":"مظهر جديد","description":"أعيد تصميمها من الألف إلى الياء"},{"icon":"nav","title":"سهولة التنقل","description":"تحسين شريط التنقل والتخطيطات والتدفقات"},{"icon":"cards","title":"تحسين إدارة الحساب","description":"أسهل من أي وقت مضى"},{"icon":"pallete","title":"تخصيص بطاقة الرصيد","description":"اجعلها لك!"},{"icon":"trans","title":"عرض المعاملات السريعة","description":""}]
\ No newline at end of file
+[{"title":"تحسينات الأداء","description":"تحسين أداء التطبيق وسرعته"},{"title":"إصلاحات الشوائب","description":"سحق المزيد من الأخطاء، لجعل تجربتك سلسة"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_bg.json b/assets/new-ui/changelog/text/changelog_bg.json
index eddfae8..2877f4b 100644
--- a/assets/new-ui/changelog/text/changelog_bg.json
+++ b/assets/new-ui/changelog/text/changelog_bg.json
@@ -1 +1 @@
-[{"icon":"star","title":"Нов облик","description":"Преработен от нулата"},{"icon":"nav","title":"По-лесна навигация","description":"Подобрена навигационна лента, оформления и потоци"},{"icon":"cards","title":"Подобрено управление на акаунта","description":"По-лесно от всякога"},{"icon":"pallete","title":"Персонализиране на балансова карта","description":"Направи го твой!"},{"icon":"trans","title":"Изглед на бързи транзакции","description":""}]
\ No newline at end of file
+[{"title":"Подобрения в производителността","description":"Подобрете производителността и скоростта на приложението"},{"title":"Поправки на грешки","description":"Скуош повече грешки, за да направи вашето изживяване гладко"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_cs.json b/assets/new-ui/changelog/text/changelog_cs.json
index 4a7d184..9efed47 100644
--- a/assets/new-ui/changelog/text/changelog_cs.json
+++ b/assets/new-ui/changelog/text/changelog_cs.json
@@ -1 +1 @@
-[{"icon":"star","title":"Nový vzhled","description":"Od základu předělaný"},{"icon":"nav","title":"Jednodušší navigace","description":"Vylepšený navigační panel, rozvržení a toky"},{"icon":"cards","title":"Vylepšená správa účtu","description":"Snazší než kdy jindy"},{"icon":"pallete","title":"Přizpůsobení karty zůstatku","description":"Udělejte to po svém!"},{"icon":"trans","title":"Rychlé zobrazení transakcí","description":""}]
\ No newline at end of file
+[{"title":"Vylepšení výkonu","description":"Zlepšete výkon a rychlost aplikace"},{"title":"Opravy chyb","description":"Squash více chyb, aby vaše zkušenosti hladké"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_de.json b/assets/new-ui/changelog/text/changelog_de.json
index 5e53dcb..b5d7552 100644
--- a/assets/new-ui/changelog/text/changelog_de.json
+++ b/assets/new-ui/changelog/text/changelog_de.json
@@ -1 +1 @@
-[{"icon":"star","title":"Neuer Look","description":"Von Grund auf neu gestaltet"},{"icon":"nav","title":"Einfachere Navigation","description":"Verbesserte Navigationsleiste, Layouts und Abläufe"},{"icon":"cards","title":"Verbesserte Kontoverwaltung","description":"Einfacher als je zuvor"},{"icon":"pallete","title":"Anpassung der Guthabenkarte","description":"Machen Sie es zu Ihrem!"},{"icon":"trans","title":"Schnelle Transaktionsansicht","description":""}]
\ No newline at end of file
+[{"title":"Leistungsverbesserungen","description":"Verbessern Sie die Leistung und Geschwindigkeit der App"},{"title":"Fehlerbehebungen","description":"Beseitigen Sie mehr Fehler, um Ihr Erlebnis reibungslos zu gestalten"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_en.json b/assets/new-ui/changelog/text/changelog_en.json
index 9c9bf4c..e86b26b 100644
--- a/assets/new-ui/changelog/text/changelog_en.json
+++ b/assets/new-ui/changelog/text/changelog_en.json
@@ -1,27 +1,10 @@
[
{
- "icon": "star",
- "title": "New look",
- "description": "Redesigned from the ground up"
+ "title": "Performance enhancements",
+ "description": "Improve app performance and speed"
},
{
- "icon": "nav",
- "title": "Easier navigation",
- "description": "Improved navbar, layouts and flows"
- },
- {
- "icon": "cards",
- "title": "Improved account management",
- "description": "Easier than ever"
- },
- {
- "icon": "pallete",
- "title": "Balance card customization",
- "description": "Make it yours!"
- },
- {
- "icon": "trans",
- "title": "Quick transactions view",
- "description": ""
+ "title": "Bug fixes",
+ "description": "Squash more bugs, to make your experience smooth"
}
]
diff --git a/assets/new-ui/changelog/text/changelog_es.json b/assets/new-ui/changelog/text/changelog_es.json
index 1739b62..190055e 100644
--- a/assets/new-ui/changelog/text/changelog_es.json
+++ b/assets/new-ui/changelog/text/changelog_es.json
@@ -1 +1 @@
-[{"icon":"star","title":"Nueva apariencia","description":"Rediseñado desde cero"},{"icon":"nav","title":"Navegación más fácil","description":"Barra de navegación, diseños y flujos mejorados."},{"icon":"cards","title":"Gestión de cuentas mejorada","description":"Más fácil que nunca"},{"icon":"pallete","title":"Personalización de la tarjeta de saldo","description":"¡Hazlo tuyo!"},{"icon":"trans","title":"Vista rápida de transacciones","description":""}]
\ No newline at end of file
+[{"title":"Mejoras de rendimiento","description":"Mejorar el rendimiento y la velocidad de la aplicación"},{"title":"Corrección de errores","description":"Elimina más errores para que tu experiencia sea fluida"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_fa.json b/assets/new-ui/changelog/text/changelog_fa.json
index cf2694f..62c16aa 100644
--- a/assets/new-ui/changelog/text/changelog_fa.json
+++ b/assets/new-ui/changelog/text/changelog_fa.json
@@ -1 +1 @@
-[{"icon":"star","title":"ظاهر جدید","description":"بازطراحی شده از پایه"},{"icon":"nav","title":"ناوبری آسان تر","description":"نوار ناوبری، طرحبندیها و جریانها بهبود یافته است"},{"icon":"cards","title":"بهبود مدیریت حساب","description":"راحت تر از همیشه"},{"icon":"pallete","title":"سفارشی سازی کارت موجودی","description":"آن را مال خودت کن!"},{"icon":"trans","title":"نمای معاملات سریع","description":""}]
\ No newline at end of file
+[{"title":"بهبود عملکرد","description":"بهبود عملکرد و سرعت برنامه"},{"title":"رفع اشکال","description":"اشکالات بیشتری را حل کنید تا تجربه خود را صاف کنید"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_fr.json b/assets/new-ui/changelog/text/changelog_fr.json
index c1718c0..fef15fa 100644
--- a/assets/new-ui/changelog/text/changelog_fr.json
+++ b/assets/new-ui/changelog/text/changelog_fr.json
@@ -1 +1 @@
-[{"icon":"star","title":"Nouveau look","description":"Repensé de fond en comble"},{"icon":"nav","title":"Navigation plus facile","description":"Barre de navigation, mises en page et flux améliorés"},{"icon":"cards","title":"Gestion de compte améliorée","description":"Plus facile que jamais"},{"icon":"pallete","title":"Personnalisation de la carte de solde","description":"Faites-en le vôtre !"},{"icon":"trans","title":"Vue des transactions rapides","description":""}]
\ No newline at end of file
+[{"title":"Améliorations des performances","description":"Améliorer les performances et la vitesse des applications"},{"title":"Corrections de bugs","description":"Éliminez plus de bugs pour rendre votre expérience fluide"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_gn.json b/assets/new-ui/changelog/text/changelog_gn.json
index 023dc53..790a93e 100644
--- a/assets/new-ui/changelog/text/changelog_gn.json
+++ b/assets/new-ui/changelog/text/changelog_gn.json
@@ -1 +1 @@
-[{"icon":"star","title":"Ojehecha pyahu","description":"Ojejapo jey yvýguio"},{"icon":"nav","title":"Navegación ndahasýiva","description":"Oñemoporãve navbar, diseño ha flujo"},{"icon":"cards","title":"Oñemoporãve cuenta gestión rehegua","description":"Ndahasýive yma guarégui"},{"icon":"pallete","title":"Tarjeta de saldo personalización rehegua","description":"¡Ejapo chugui nde mba'e!"},{"icon":"trans","title":"Umi transacción pya’e jehechauka","description":""}]
\ No newline at end of file
+[{"title":"Ñemboguata ñembotuichave rehegua","description":"Emoporãve app rembiapo ha pya’e"},{"title":"Umi mba’e’oka ñemyatyrõ","description":"Embopupu hetave mba’e’oka, ikatu hag̃uáicha nde experiencia osẽ porã"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_ha.json b/assets/new-ui/changelog/text/changelog_ha.json
index a41b71f..aaf694d 100644
--- a/assets/new-ui/changelog/text/changelog_ha.json
+++ b/assets/new-ui/changelog/text/changelog_ha.json
@@ -1 +1 @@
-[{"icon":"star","title":"Sabon kallo","description":"An sake tsara shi daga ƙasa zuwa sama"},{"icon":"nav","title":"Sauƙin kewayawa","description":"Ingantattun navbar, shimfidu da gudana"},{"icon":"cards","title":"Inganta sarrafa asusun","description":"Sauki fiye da kowane lokaci"},{"icon":"pallete","title":"Daidaiton katin ma'auni","description":"Maida shi naku!"},{"icon":"trans","title":"Duban ma'amaloli da sauri","description":""}]
\ No newline at end of file
+[{"title":"Ayyukan haɓakawa","description":"Inganta aikin app da sauri"},{"title":"Gyaran kwaro","description":"Squash ƙarin kwari, don sanya kwarewarku ta santsi"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_hi.json b/assets/new-ui/changelog/text/changelog_hi.json
index 3242775..45ee050 100644
--- a/assets/new-ui/changelog/text/changelog_hi.json
+++ b/assets/new-ui/changelog/text/changelog_hi.json
@@ -1 +1 @@
-[{"icon":"star","title":"नया रूप","description":"ज़मीन से ऊपर तक पुनः डिज़ाइन किया गया"},{"icon":"nav","title":"आसान नेविगेशन","description":"बेहतर नेवबार, लेआउट और प्रवाह"},{"icon":"cards","title":"बेहतर खाता प्रबंधन","description":"पहले से कहीं ज्यादा आसान"},{"icon":"pallete","title":"बैलेंस कार्ड अनुकूलन","description":"इसे अपना बनाएं!"},{"icon":"trans","title":"त्वरित लेनदेन दृश्य","description":""}]
\ No newline at end of file
+[{"title":"प्रदर्शन संवर्द्धन","description":"ऐप के प्रदर्शन और गति में सुधार करें"},{"title":"कंप्यूटर प्रोग्राम या प्रणाली में बग को दूर करना","description":"अपने अनुभव को सहज बनाने के लिए अधिक बग्स को नष्ट करें"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_hr.json b/assets/new-ui/changelog/text/changelog_hr.json
index 61d33f1..4e46a5d 100644
--- a/assets/new-ui/changelog/text/changelog_hr.json
+++ b/assets/new-ui/changelog/text/changelog_hr.json
@@ -1 +1 @@
-[{"icon":"star","title":"Novi izgled","description":"Redizajniran iz temelja"},{"icon":"nav","title":"Lakša navigacija","description":"Poboljšana navigacijska traka, izgledi i tokovi"},{"icon":"cards","title":"Poboljšano upravljanje računom","description":"Lakše nego ikada"},{"icon":"pallete","title":"Prilagodba kartice stanja","description":"Učinite ga svojim!"},{"icon":"trans","title":"Pregled brzih transakcija","description":""}]
\ No newline at end of file
+[{"title":"Poboljšanja performansi","description":"Poboljšajte performanse i brzinu aplikacije"},{"title":"Ispravci grešaka","description":"Uklonite više grešaka kako bi vaše iskustvo bilo glatko"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_hy.json b/assets/new-ui/changelog/text/changelog_hy.json
index 038e862..65e5286 100644
--- a/assets/new-ui/changelog/text/changelog_hy.json
+++ b/assets/new-ui/changelog/text/changelog_hy.json
@@ -1 +1 @@
-[{"icon":"star","title":"Նոր տեսք","description":"Վերանախագծված է ի սկզբանե"},{"icon":"nav","title":"Ավելի հեշտ նավարկություն","description":"Բարելավված navbar, դասավորություններ և հոսքեր"},{"icon":"cards","title":"Բարելավված հաշվի կառավարում","description":"Ավելի հեշտ, քան երբևէ"},{"icon":"pallete","title":"Հաշվեկշռային քարտի հարմարեցում","description":"Դարձրե՛ք այն ձերը:"},{"icon":"trans","title":"Արագ գործարքների դիտում","description":""}]
\ No newline at end of file
+[{"title":"Կատարման բարելավումներ","description":"Բարելավել հավելվածի կատարումը և արագությունը"},{"title":"Սխալների շտկում","description":"Դարձրեք ավելի շատ սխալներ, որպեսզի ձեր փորձը հարթ լինի"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_id.json b/assets/new-ui/changelog/text/changelog_id.json
index e59825b..07c6e93 100644
--- a/assets/new-ui/changelog/text/changelog_id.json
+++ b/assets/new-ui/changelog/text/changelog_id.json
@@ -1 +1 @@
-[{"icon":"star","title":"Tampilan baru","description":"Didesain ulang dari awal"},{"icon":"nav","title":"Navigasi yang lebih mudah","description":"Peningkatan bilah navigasi, tata letak, dan alur"},{"icon":"cards","title":"Peningkatan manajemen akun","description":"Lebih mudah dari sebelumnya"},{"icon":"pallete","title":"Kustomisasi kartu saldo","description":"Jadikan itu milikmu!"},{"icon":"trans","title":"Tampilan transaksi cepat","description":""}]
\ No newline at end of file
+[{"title":"Peningkatan kinerja","description":"Tingkatkan kinerja dan kecepatan aplikasi"},{"title":"Perbaikan bug","description":"Hancurkan lebih banyak bug, untuk membuat pengalaman Anda lancar"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_it.json b/assets/new-ui/changelog/text/changelog_it.json
index 324cfd1..ce0c353 100644
--- a/assets/new-ui/changelog/text/changelog_it.json
+++ b/assets/new-ui/changelog/text/changelog_it.json
@@ -1 +1 @@
-[{"icon":"star","title":"Nuovo aspetto","description":"Riprogettato da zero"},{"icon":"nav","title":"Navigazione più semplice","description":"Barra di navigazione, layout e flussi migliorati"},{"icon":"cards","title":"Gestione dell'account migliorata","description":"Più facile che mai"},{"icon":"pallete","title":"Personalizzazione della carta saldo","description":"Rendilo tuo!"},{"icon":"trans","title":"Visualizzazione rapida delle transazioni","description":""}]
\ No newline at end of file
+[{"title":"Miglioramenti delle prestazioni","description":"Migliora le prestazioni e la velocità dell'app"},{"title":"Correzioni di bug","description":"Elimina più bug per rendere la tua esperienza fluida"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_ja.json b/assets/new-ui/changelog/text/changelog_ja.json
index a9a24bd..d25003f 100644
--- a/assets/new-ui/changelog/text/changelog_ja.json
+++ b/assets/new-ui/changelog/text/changelog_ja.json
@@ -1 +1 @@
-[{"icon":"star","title":"新しい外観","description":"根本から再設計"},{"icon":"nav","title":"より簡単なナビゲーション","description":"ナビゲーションバー、レイアウト、フローの改善"},{"icon":"cards","title":"アカウント管理の改善","description":"これまでよりも簡単に"},{"icon":"pallete","title":"バランスカードのカスタマイズ","description":"それをあなたのものにしてください!"},{"icon":"trans","title":"クイックトランザクションビュー","description":""}]
\ No newline at end of file
+[{"title":"パフォーマンスの強化","description":"アプリのパフォーマンスと速度を向上させる"},{"title":"バグ修正","description":"エクスペリエンスをスムーズにするために、より多くのバグを潰してください"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_ko.json b/assets/new-ui/changelog/text/changelog_ko.json
index d729e13..e2b9694 100644
--- a/assets/new-ui/changelog/text/changelog_ko.json
+++ b/assets/new-ui/changelog/text/changelog_ko.json
@@ -1 +1 @@
-[{"icon":"star","title":"새로운 모습","description":"처음부터 새롭게 디자인되었습니다."},{"icon":"nav","title":"더욱 쉬워진 탐색","description":"향상된 탐색 모음, 레이아웃 및 흐름"},{"icon":"cards","title":"향상된 계정 관리","description":"그 어느 때보다 쉬워졌습니다."},{"icon":"pallete","title":"잔액 카드 사용자 정의","description":"당신의 것으로 만들어보세요!"},{"icon":"trans","title":"빠른 거래 보기","description":""}]
\ No newline at end of file
+[{"title":"성능 향상","description":"앱 성능 및 속도 향상"},{"title":"버그 수정","description":"더 많은 버그를 제거하여 원활한 경험을 만드세요"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_my.json b/assets/new-ui/changelog/text/changelog_my.json
index 959683d..26d570e 100644
--- a/assets/new-ui/changelog/text/changelog_my.json
+++ b/assets/new-ui/changelog/text/changelog_my.json
@@ -1 +1 @@
-[{"icon":"star","title":"အမြင်သစ်","description":"မြေပြင်မှ ပြန်လည်ဒီဇိုင်းထုတ်ထားသည်။"},{"icon":"nav","title":"ပိုမိုလွယ်ကူသောလမ်းကြောင်း","description":"navbar၊ အပြင်အဆင်များနှင့် စီးဆင်းမှုများကို မြှင့်တင်ထားသည်။"},{"icon":"cards","title":"ပိုမိုကောင်းမွန်သော အကောင့်စီမံခန့်ခွဲမှု","description":"အရင်ကထက် ပိုလွယ်တယ်။"},{"icon":"pallete","title":"လက်ကျန်ကတ် စိတ်ကြိုက်ပြုလုပ်ခြင်း။","description":"အဲဒါကို မင်းအတွက် လုပ်ပါ။"},{"icon":"trans","title":"လျင်မြန်သော ငွေပေးငွေယူ မြင်ကွင်း","description":""}]
\ No newline at end of file
+[{"title":"စွမ်းဆောင်ရည်မြှင့်တင်မှုများ","description":"အက်ပ်စွမ်းဆောင်ရည်နှင့် မြန်နှုန်းကို မြှင့်တင်ပါ။"},{"title":"ချွတ်ယွင်းချက်ပြင်ဆင်မှုများ","description":"သင့်အတွေ့အကြုံကို ချောမွေ့စေရန်အတွက် နောက်ထပ် bug များကို နှိမ်နင်းပါ။"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_nl.json b/assets/new-ui/changelog/text/changelog_nl.json
index 533436a..f758a90 100644
--- a/assets/new-ui/changelog/text/changelog_nl.json
+++ b/assets/new-ui/changelog/text/changelog_nl.json
@@ -1 +1 @@
-[{"icon":"star","title":"Nieuwe look","description":"Opnieuw ontworpen vanaf de grond af"},{"icon":"nav","title":"Gemakkelijkere navigatie","description":"Verbeterde navigatiebalk, lay-outs en stromen"},{"icon":"cards","title":"Verbeterd accountbeheer","description":"Makkelijker dan ooit"},{"icon":"pallete","title":"Aanpassing van de saldokaart","description":"Maak het de jouwe!"},{"icon":"trans","title":"Snelle transactieweergave","description":""}]
\ No newline at end of file
+[{"title":"Prestatieverbeteringen","description":"Verbeter de app-prestaties en snelheid"},{"title":"Bugfixes","description":"Vernietig meer bugs om uw ervaring soepel te laten verlopen"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_pl.json b/assets/new-ui/changelog/text/changelog_pl.json
index 72ba305..808854d 100644
--- a/assets/new-ui/changelog/text/changelog_pl.json
+++ b/assets/new-ui/changelog/text/changelog_pl.json
@@ -1 +1 @@
-[{"icon":"star","title":"Nowy wygląd","description":"Przeprojektowany od podstaw"},{"icon":"nav","title":"Łatwiejsza nawigacja","description":"Ulepszony pasek nawigacyjny, układy i przepływy"},{"icon":"cards","title":"Ulepszone zarządzanie kontem","description":"Łatwiejsze niż kiedykolwiek"},{"icon":"pallete","title":"Dostosowanie karty salda","description":"Zrób to swoje!"},{"icon":"trans","title":"Szybki podgląd transakcji","description":""}]
\ No newline at end of file
+[{"title":"Ulepszenia wydajności","description":"Popraw wydajność i szybkość aplikacji"},{"title":"Poprawki błędów","description":"Zmiażdż więcej błędów, aby zapewnić płynność działania"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_pt.json b/assets/new-ui/changelog/text/changelog_pt.json
index 3c14c9f..272b9de 100644
--- a/assets/new-ui/changelog/text/changelog_pt.json
+++ b/assets/new-ui/changelog/text/changelog_pt.json
@@ -1 +1 @@
-[{"icon":"star","title":"Novo visual","description":"Redesenhado do zero"},{"icon":"nav","title":"Navegação mais fácil","description":"Barra de navegação, layouts e fluxos aprimorados"},{"icon":"cards","title":"Gerenciamento de conta aprimorado","description":"Mais fácil do que nunca"},{"icon":"pallete","title":"Personalização do cartão de saldo","description":"Faça o seu!"},{"icon":"trans","title":"Visualização rápida de transações","description":""}]
\ No newline at end of file
+[{"title":"Melhorias de desempenho","description":"Melhore o desempenho e a velocidade do aplicativo"},{"title":"Correções de bugs","description":"Elimine mais bugs para tornar sua experiência mais tranquila"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_ru.json b/assets/new-ui/changelog/text/changelog_ru.json
index 6a0b870..001cb94 100644
--- a/assets/new-ui/changelog/text/changelog_ru.json
+++ b/assets/new-ui/changelog/text/changelog_ru.json
@@ -1 +1 @@
-[{"icon":"star","title":"Новый облик","description":"Переработан с нуля"},{"icon":"nav","title":"Упрощенная навигация","description":"Улучшенная панель навигации, макеты и потоки."},{"icon":"cards","title":"Улучшенное управление аккаунтом","description":"Легче, чем когда-либо"},{"icon":"pallete","title":"Настройка балансовой карты","description":"Сделайте это своим!"},{"icon":"trans","title":"Быстрый просмотр транзакций","description":""}]
\ No newline at end of file
+[{"title":"Улучшения производительности","description":"Улучшите производительность и скорость приложения"},{"title":"Исправления ошибок","description":"Устраняйте больше ошибок, чтобы сделать вашу работу более комфортной."}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_th.json b/assets/new-ui/changelog/text/changelog_th.json
index 133a885..32032f6 100644
--- a/assets/new-ui/changelog/text/changelog_th.json
+++ b/assets/new-ui/changelog/text/changelog_th.json
@@ -1 +1 @@
-[{"icon":"star","title":"รูปลักษณ์ใหม่","description":"ออกแบบใหม่ตั้งแต่ต้นจนจบ"},{"icon":"nav","title":"การนำทางที่ง่ายขึ้น","description":"ปรับปรุงแถบนำทาง เค้าโครง และโฟลว์"},{"icon":"cards","title":"ปรับปรุงการจัดการบัญชี","description":"ง่ายกว่าที่เคย"},{"icon":"pallete","title":"การปรับแต่งการ์ดบาลานซ์","description":"ทำให้มันเป็นของคุณ!"},{"icon":"trans","title":"มุมมองธุรกรรมด่วน","description":""}]
\ No newline at end of file
+[{"title":"การปรับปรุงประสิทธิภาพ","description":"ปรับปรุงประสิทธิภาพและความเร็วของแอป"},{"title":"แก้ไขข้อบกพร่อง","description":"กำจัดแมลงให้มากขึ้นเพื่อทำให้ประสบการณ์ของคุณราบรื่น"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_tl.json b/assets/new-ui/changelog/text/changelog_tl.json
index 45ecd1f..271760c 100644
--- a/assets/new-ui/changelog/text/changelog_tl.json
+++ b/assets/new-ui/changelog/text/changelog_tl.json
@@ -1 +1 @@
-[{"icon":"star","title":"Bagong hitsura","description":"Muling idinisenyo mula sa simula"},{"icon":"nav","title":"Mas madaling nabigasyon","description":"Pinahusay na navbar, mga layout at daloy"},{"icon":"cards","title":"Pinahusay na pamamahala ng account","description":"Mas madali kaysa dati"},{"icon":"pallete","title":"Pag-customize ng balanse ng card","description":"Gawin ito sa iyo!"},{"icon":"trans","title":"Mabilis na pagtingin sa mga transaksyon","description":""}]
\ No newline at end of file
+[{"title":"Mga pagpapahusay sa pagganap","description":"Pagbutihin ang pagganap at bilis ng app"},{"title":"Mga pag-aayos ng bug","description":"Mag-squash ng higit pang mga bug, para maging maayos ang iyong karanasan"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_tr.json b/assets/new-ui/changelog/text/changelog_tr.json
index e717273..f859b7a 100644
--- a/assets/new-ui/changelog/text/changelog_tr.json
+++ b/assets/new-ui/changelog/text/changelog_tr.json
@@ -1 +1 @@
-[{"icon":"star","title":"Yeni görünüm","description":"Baştan sona yeniden tasarlandı"},{"icon":"nav","title":"Daha kolay gezinme","description":"Geliştirilmiş gezinme çubuğu, düzenler ve akışlar"},{"icon":"cards","title":"Geliştirilmiş hesap yönetimi","description":"Her zamankinden daha kolay"},{"icon":"pallete","title":"Bakiye kartı özelleştirme","description":"Senin olsun!"},{"icon":"trans","title":"Hızlı işlemler görünümü","description":""}]
\ No newline at end of file
+[{"title":"Performans iyileştirmeleri","description":"Uygulama performansını ve hızını artırın"},{"title":"Hata düzeltmeleri","description":"Deneyiminizi sorunsuz hale getirmek için daha fazla hatayı giderin"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_uk.json b/assets/new-ui/changelog/text/changelog_uk.json
index c5a80a2..9b92e1d 100644
--- a/assets/new-ui/changelog/text/changelog_uk.json
+++ b/assets/new-ui/changelog/text/changelog_uk.json
@@ -1 +1 @@
-[{"icon":"star","title":"Новий вигляд","description":"Перероблено з нуля"},{"icon":"nav","title":"Простіша навігація","description":"Покращено панель навігації, макети та потоки"},{"icon":"cards","title":"Покращене керування обліковим записом","description":"Легше, ніж будь-коли"},{"icon":"pallete","title":"Налаштування картки балансу","description":"Зробіть це своїм!"},{"icon":"trans","title":"Швидкий перегляд транзакцій","description":""}]
\ No newline at end of file
+[{"title":"Підвищення продуктивності","description":"Покращте продуктивність і швидкість програми"},{"title":"Виправлення помилок","description":"Усуньте більше помилок, щоб ваш досвід був плавним"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_ur.json b/assets/new-ui/changelog/text/changelog_ur.json
index 44bbbff..b23d3bc 100644
--- a/assets/new-ui/changelog/text/changelog_ur.json
+++ b/assets/new-ui/changelog/text/changelog_ur.json
@@ -1 +1 @@
-[{"icon":"star","title":"نئی شکل","description":"زمین سے دوبارہ ڈیزائن کیا گیا۔"},{"icon":"nav","title":"آسان نیویگیشن","description":"بہتر نوبار، ترتیب اور بہاؤ"},{"icon":"cards","title":"بہتر اکاؤنٹ مینیجمنٹ","description":"پہلے سے کہیں زیادہ آسان"},{"icon":"pallete","title":"بیلنس کارڈ حسب ضرورت","description":"اسے اپنا بنائیں!"},{"icon":"trans","title":"فوری لین دین کا نظارہ","description":""}]
\ No newline at end of file
+[{"title":"کارکردگی میں اضافہ","description":"ایپ کی کارکردگی اور رفتار کو بہتر بنائیں"},{"title":"بگ کی اصلاحات","description":"اپنے تجربے کو ہموار بنانے کے لیے مزید کیڑے نکالیں۔"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_vi.json b/assets/new-ui/changelog/text/changelog_vi.json
index dac1545..74619ce 100644
--- a/assets/new-ui/changelog/text/changelog_vi.json
+++ b/assets/new-ui/changelog/text/changelog_vi.json
@@ -1 +1 @@
-[{"icon":"star","title":"Giao diện mới","description":"Được thiết kế lại từ đầu"},{"icon":"nav","title":"Điều hướng dễ dàng hơn","description":"Thanh điều hướng, bố cục và luồng được cải thiện"},{"icon":"cards","title":"Cải thiện quản lý tài khoản","description":"Dễ dàng hơn bao giờ hết"},{"icon":"pallete","title":"Tùy chỉnh thẻ số dư","description":"Hãy biến nó thành của bạn!"},{"icon":"trans","title":"Xem giao dịch nhanh","description":""}]
\ No newline at end of file
+[{"title":"Cải tiến hiệu suất","description":"Cải thiện hiệu suất và tốc độ ứng dụng"},{"title":"Sửa lỗi","description":"Diệt nhiều lỗi hơn để giúp trải nghiệm của bạn mượt mà hơn"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_yo.json b/assets/new-ui/changelog/text/changelog_yo.json
index 6744a25..0187321 100644
--- a/assets/new-ui/changelog/text/changelog_yo.json
+++ b/assets/new-ui/changelog/text/changelog_yo.json
@@ -1 +1 @@
-[{"icon":"star","title":"Iwo tuntun","description":"Atunse lati ilẹ soke"},{"icon":"nav","title":"Rọrun lilọ","description":"Ilọsiwaju navbar, ipalemo ati awọn sisan"},{"icon":"cards","title":"Imudara iṣakoso akọọlẹ","description":"Rọrun ju lailai"},{"icon":"pallete","title":"Iwontunwonsi kaadi isọdi","description":"Ṣe tirẹ!"},{"icon":"trans","title":"Wiwo awọn iṣowo yarayara","description":""}]
\ No newline at end of file
+[{"title":"Awọn ilọsiwaju iṣẹ","description":"Ṣe ilọsiwaju iṣẹ ṣiṣe ati iyara app"},{"title":"Awọn atunṣe kokoro","description":"Squash diẹ sii awọn idun, lati jẹ ki iriri rẹ dan"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_zh-cn.json b/assets/new-ui/changelog/text/changelog_zh-cn.json
index 321552a..2e0f1ee 100644
--- a/assets/new-ui/changelog/text/changelog_zh-cn.json
+++ b/assets/new-ui/changelog/text/changelog_zh-cn.json
@@ -1 +1 @@
-[{"icon":"star","title":"新面貌","description":"从头开始重新设计"},{"icon":"nav","title":"更轻松的导航","description":"改进的导航栏、布局和流程"},{"icon":"cards","title":"改进账户管理","description":"比以往更容易"},{"icon":"pallete","title":"余额卡定制","description":"让它成为你的!"},{"icon":"trans","title":"快速交易视图","description":""}]
\ No newline at end of file
+[{"title":"性能增强","description":"提高应用程序性能和速度"},{"title":"错误修复","description":"修复更多bug,让您的体验更加流畅"}]
\ No newline at end of file
diff --git a/assets/new-ui/changelog/text/changelog_zh-tw.json b/assets/new-ui/changelog/text/changelog_zh-tw.json
index 4e33fb9..da53a5b 100644
--- a/assets/new-ui/changelog/text/changelog_zh-tw.json
+++ b/assets/new-ui/changelog/text/changelog_zh-tw.json
@@ -1 +1 @@
-[{"icon":"star","title":"新面貌","description":"從頭開始重新設計"},{"icon":"nav","title":"更輕鬆的導航","description":"改進的導覽列、佈局和流程"},{"icon":"cards","title":"改進帳戶管理","description":"比以往更容易"},{"icon":"pallete","title":"餘額卡定制","description":"讓它成為你的!"},{"icon":"trans","title":"快速交易視圖","description":""}]
\ No newline at end of file
+[{"title":"效能增強","description":"提高應用程式效能和速度"},{"title":"錯誤修復","description":"修復更多bug,讓您的體驗更加流暢"}]
\ No newline at end of file
diff --git a/cw_bitcoin/lib/bitcoin_wallet.dart b/cw_bitcoin/lib/bitcoin_wallet.dart
index ffb86a2..2461884 100644
--- a/cw_bitcoin/lib/bitcoin_wallet.dart
+++ b/cw_bitcoin/lib/bitcoin_wallet.dart
@@ -151,6 +151,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
seedBytes: seedBytes,
apiKey: secrets.breezApiKey,
lnurlDomain: "cake.cash",
+ cachedAddress: cachedLightningAddress,
);
}
} else {
diff --git a/cw_bitcoin/lib/electrum_wallet_addresses.dart b/cw_bitcoin/lib/electrum_wallet_addresses.dart
index 404d4e9..15e0e02 100644
--- a/cw_bitcoin/lib/electrum_wallet_addresses.dart
+++ b/cw_bitcoin/lib/electrum_wallet_addresses.dart
@@ -81,6 +81,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store {
mwebAddresses =
ObservableList<BitcoinAddressRecord>.of((initialMwebAddresses ?? []).toSet()),
lockedReceiveAddressByType = ObservableMap<BitcoinAddressType, String>(),
+ lightningAddress = lightningWallet?.cachedAddress,
super(walletInfo) {
if (masterHd != null) {
silentAddress = SilentPaymentOwner.fromPrivateKeys(
@@ -490,6 +491,14 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store {
addressesMap[address] = 'Active - Silent Payments';
}
}
+
+ if (lightningAddress != null) {
+ if (lightningAddress != address) {
+ addressesMap[lightningAddress!] = 'LN';
+ } else {
+ addressesMap[address] = 'Active - LN';
+ }
+ }
}
void addLitecoinAddressTypes() {
@@ -767,34 +776,40 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store {
Future<void> setLightningAddress(String walletName, {String newAddress = ""}) async {
if (lightningWallet == null) return;
- final path = await pathForWalletDir(name: walletName, type: WalletType.bitcoin);
- final initialized = await lightningWallet!.init(path);
+ try {
+ final path = await pathForWalletDir(name: walletName, type: WalletType.bitcoin);
+ final initialized = await lightningWallet!.init(path);
- if (!initialized) {
- printV("Failed to initialize the lightning wallet");
- return;
- }
+ if (!initialized) {
+ printV("Failed to initialize the lightning wallet");
+ return;
+ }
- lightningAddress = await lightningWallet!.getAddress();
+ lightningAddress = await lightningWallet!.getAddress();
- late final String username;
+ late final String username;
- if (newAddress.isEmpty) {
- if (lightningAddress != null) return;
+ if (newAddress.isEmpty) {
+ if (lightningAddress != null) return;
final randomNumber = Random.secure().nextInt(9999);
final randomName = await generateName();
username = "${randomName.replaceAll(" ", "")}$randomNumber".toLowerCase();
- } else {
- username = newAddress;
- }
+ } else {
+ username = newAddress;
+ }
- try {
- printV(username);
- lightningAddress = await lightningWallet!.registerAddress(username);
+ try {
+ printV(username);
+ lightningAddress = await lightningWallet!.registerAddress(username);
+ } catch (e) {
+ printV(e);
+ printV(username);
+ rethrow;
+ }
} catch (e) {
- printV(e);
- printV(username);
+ // make sure lightningAddress gets initialized anyway
+ lightningAddress ??= lightningWallet!.cachedAddress;
rethrow;
}
}
diff --git a/cw_bitcoin/lib/lightning/lightning_wallet.dart b/cw_bitcoin/lib/lightning/lightning_wallet.dart
index e450f07..d2e1a9c 100644
--- a/cw_bitcoin/lib/lightning/lightning_wallet.dart
+++ b/cw_bitcoin/lib/lightning/lightning_wallet.dart
@@ -77,8 +77,6 @@ class LightningWallet {
_eventStream ??= sdk.addEventListener().asBroadcastStream();
_logStream ??= initLogging().asBroadcastStream();
- await sdk.syncWallet(request: SyncWalletRequest());
-
try {
final logFile = File("$appPath/lightning.log")
..createSync();
@@ -87,6 +85,8 @@ class LightningWallet {
printV(e);
}
+ await sdk.syncWallet(request: SyncWalletRequest());
+
return true;
} catch (e) {
printV(e);
diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart
index 1371ed3..a88a67d 100644
--- a/cw_core/lib/crypto_currency.dart
+++ b/cw_core/lib/crypto_currency.dart
@@ -35,6 +35,7 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
static const all = [
CryptoCurrency.xmr,
CryptoCurrency.btc,
+ CryptoCurrency.btcln,
CryptoCurrency.eth,
CryptoCurrency.ltc,
CryptoCurrency.doge,
@@ -83,7 +84,6 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
CryptoCurrency.scrt,
CryptoCurrency.uni,
CryptoCurrency.stx,
- CryptoCurrency.btcln,
CryptoCurrency.shib,
CryptoCurrency.aave,
CryptoCurrency.arb,
diff --git a/lib/core/lightning_invoice_service.dart b/lib/core/lightning_invoice_service.dart
new file mode 100644
index 0000000..995c62d
--- /dev/null
+++ b/lib/core/lightning_invoice_service.dart
@@ -0,0 +1,58 @@
+import 'dart:convert';
+
+import 'package:cw_core/utils/proxy_wrapper.dart';
+
+Future<String?> getBolt11FromLightingAddress(String lightningAddress, {int amount = 0}) async {
+ try {
+ final uri = getURlOfLightningAddress(lightningAddress);
+
+ var response = await ProxyWrapper().get(clearnetUri: uri);
+ final responseBody =
+ _LNURLPResponseDTO.fromJson(jsonDecode(response.body) as Map<String, dynamic>);
+
+ response =
+ await ProxyWrapper().get(clearnetUri: Uri.parse("${responseBody.callback}?amount=$amount"));
+
+ final callbackResponseBody =
+ _LNURLPCallbackResponseDTO.fromJson(jsonDecode(response.body) as Map<String, dynamic>);
+
+ return callbackResponseBody.pr;
+ } catch (e) {
+ return null;
+ }
+}
+
+Uri getURlOfLightningAddress(String lightningAddress) {
+ final parts = lightningAddress.split("@");
+
+ final name = parts.first;
+ final domain = parts.last;
+ return Uri.parse("https://$domain/.well-known/lnurlp/$name");
+}
+
+class _LNURLPResponseDTO {
+ final String callback;
+ final int maxSendable;
+ final int minSendable;
+ final String tag;
+ final String metadata;
+
+ const _LNURLPResponseDTO(
+ this.callback, this.maxSendable, this.minSendable, this.tag, this.metadata);
+
+ static _LNURLPResponseDTO fromJson(Map<String, dynamic> map) => _LNURLPResponseDTO(
+ map["callback"] as String,
+ map["maxSendable"] as int,
+ map["minSendable"] as int,
+ map["tag"] as String,
+ map["metadata"] as String);
+}
+
+class _LNURLPCallbackResponseDTO {
+ final String pr;
+
+ const _LNURLPCallbackResponseDTO(this.pr);
+
+ static _LNURLPCallbackResponseDTO fromJson(Map<String, dynamic> map) =>
+ _LNURLPCallbackResponseDTO(map["pr"] as String);
+}
diff --git a/lib/entities/default_settings_migration.dart b/lib/entities/default_settings_migration.dart
index 59e072a..cd4434d 100644
--- a/lib/entities/default_settings_migration.dart
+++ b/lib/entities/default_settings_migration.dart
@@ -595,6 +595,9 @@ Future<void> defaultSettingsMigration(
case 60: // BalanceCardStyleSettings.cardOrder no-op (handled in sqlite.dart)
// Do not migrate SQLite here, do that in sqlite.dart in order to prevent runtime
// errors, missing row and missing tables.
+ case 61:
+ // reset force dex option only 1 time and let users pick it from the swap settings preference
+ await sharedPreferences.setBool(PreferencesKey.forceDecentralizedExchanges, false);
break;
default:
break;
diff --git a/lib/exchange/provider/exolix_exchange_provider.dart b/lib/exchange/provider/exolix_exchange_provider.dart
index 4c36f40..7b8234b 100644
--- a/lib/exchange/provider/exolix_exchange_provider.dart
+++ b/lib/exchange/provider/exolix_exchange_provider.dart
@@ -1,6 +1,7 @@
import 'dart:convert';
import 'package:cake_wallet/.secrets.g.dart' as secrets;
+import 'package:cake_wallet/core/lightning_invoice_service.dart';
import 'package:cake_wallet/exchange/exchange_provider_description.dart';
import 'package:cake_wallet/exchange/limits.dart';
import 'package:cake_wallet/exchange/provider/exchange_provider.dart';
@@ -196,8 +197,8 @@ class ExolixExchangeProvider extends ExchangeProvider {
'coinTo': _normalizeCurrency(_overrideToCryptoCurrency(request.toCurrency, request.toAddress)),
'networkFrom': _networkFor(request.fromCurrency),
'networkTo': _networkFor(request.toCurrency),
- 'withdrawalAddress': _normalizeAddress(request.toAddress),
- 'refundAddress': _normalizeAddress(request.refundAddress),
+ 'withdrawalAddress': await _normalizeAddress(request.toAddress),
+ 'refundAddress': await _normalizeAddress(request.refundAddress),
'rateType': _getRateType(isFixedRateMode),
'apiToken': apiKey,
};
@@ -213,7 +214,6 @@ class ExolixExchangeProvider extends ExchangeProvider {
headers: headers,
body: json.encode(body),
);
-
if (response.statusCode == 400) {
final responseJSON = json.decode(response.body) as Map<String, dynamic>;
@@ -446,8 +446,17 @@ class ExolixExchangeProvider extends ExchangeProvider {
}
}
- String _normalizeAddress(String address) =>
- address.startsWith('bitcoincash:') ? address.replaceFirst('bitcoincash:', '') : address;
+ Future<String> _normalizeAddress(String address) async {
+ if (address.startsWith('bitcoincash:'))
+ return address.replaceFirst('bitcoincash:', '');
+
+ // Lightning addresses
+ if(address.contains("@"))
+ return await getBolt11FromLightingAddress(address) ?? address;
+
+ return address;
+ }
+
static double? _toDouble(dynamic value) {
if (value is int) {
diff --git a/lib/exchange/provider/swapsxyz_exchange_provider.dart b/lib/exchange/provider/swapsxyz_exchange_provider.dart
index 5f93394..68f4cb0 100644
--- a/lib/exchange/provider/swapsxyz_exchange_provider.dart
+++ b/lib/exchange/provider/swapsxyz_exchange_provider.dart
@@ -8,7 +8,6 @@ import 'package:cake_wallet/exchange/trade.dart';
import 'package:cake_wallet/exchange/trade_not_created_exception.dart';
import 'package:cake_wallet/exchange/trade_request.dart';
import 'package:cake_wallet/exchange/trade_state.dart';
-import 'package:cake_wallet/exchange/utils/currency_pairs_utils.dart';
import 'package:cw_core/amount_converter.dart';
import 'package:cw_core/utils/print_verbose.dart';
import 'package:cw_core/utils/proxy_wrapper.dart';
@@ -20,7 +19,7 @@ class SwapsXyzExchangeProvider extends ExchangeProvider {
static final List<CryptoCurrency> _notSupportedAsSourceToken = [
CryptoCurrency.sol,
...CryptoCurrency.all.where(
- (c) => (c.tag ?? '').toUpperCase() == 'SOL',
+ (c) => (c.tag ?? '').toUpperCase() == 'SOL' || c.tag == CryptoCurrency.bnb.tag,
),
];
@@ -209,7 +208,7 @@ class SwapsXyzExchangeProvider extends ExchangeProvider {
required bool isReceiveAmount}) async {
try {
- if(_notSupportedAsSourceToken.contains(from)) {
+ if(_notSupportedAsSourceToken.contains(from) || _notSupportedAsSourceToken.contains(to)) {
printV(
'fetchRate: source token ${from.title} is not supported as source token');
return 0.0;
diff --git a/lib/exchange/provider/trocador_exchange_provider.dart b/lib/exchange/provider/trocador_exchange_provider.dart
index a8a13b3..179e824 100644
--- a/lib/exchange/provider/trocador_exchange_provider.dart
+++ b/lib/exchange/provider/trocador_exchange_provider.dart
@@ -7,7 +7,6 @@ import 'package:cake_wallet/exchange/provider/exchange_provider.dart';
import 'package:cake_wallet/exchange/trade.dart';
import 'package:cake_wallet/exchange/trade_request.dart';
import 'package:cake_wallet/exchange/trade_state.dart';
-import 'package:cake_wallet/exchange/utils/currency_pairs_utils.dart';
import 'package:cake_wallet/wallet_type_utils.dart';
import 'package:cw_core/utils/proxy_wrapper.dart';
import 'package:cw_core/crypto_currency.dart';
diff --git a/lib/main.dart b/lib/main.dart
index 77e92e6..699bb7d 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -324,7 +324,7 @@ Future<void> initializeAppConfigs({bool loadWallet = true}) async {
payjoinSessionSource: payjoinSessionSource,
anonpayInvoiceInfo: anonpayInvoiceInfo,
havenSeedStore: havenSeedStore,
- initialMigrationVersion: 60,
+ initialMigrationVersion: 61,
);
}
diff --git a/lib/new-ui/pages/swap_page.dart b/lib/new-ui/pages/swap_page.dart
index 3f2e07e..35ad8b3 100644
--- a/lib/new-ui/pages/swap_page.dart
+++ b/lib/new-ui/pages/swap_page.dart
@@ -19,7 +19,6 @@ import 'package:cake_wallet/new-ui/widgets/swap_page/swap_address_selection_moda
import 'package:cake_wallet/new-ui/widgets/swap_page/swap_confirm_sheet.dart';
import 'package:cake_wallet/new-ui/widgets/swap_page/swap_limit_popup.dart';
import 'package:cake_wallet/new-ui/widgets/swap_page/swap_options_page.dart';
-import 'package:cake_wallet/new-ui/widgets/swap_page/swap_provider_initial_preference_modal.dart';
import 'package:cake_wallet/src/screens/exchange/widgets/currency_picker.dart';
import 'package:cake_wallet/src/screens/exchange/widgets/present_provider_picker.dart';
import 'package:cake_wallet/src/screens/send/widgets/extract_address_from_parsed.dart';
@@ -45,7 +44,6 @@ import 'package:cw_core/wallet_type.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
-import 'package:flutter_svg/svg.dart';
import 'package:mobx/mobx.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
@@ -98,20 +96,20 @@ class _NewSwapPageState extends State<NewSwapPage> {
}
WidgetsBinding.instance.addPostFrameCallback((_) {
- if (!widget.exchangeViewModel.decentralizedExchangesPromptDismissed) {
- showMaterialModalBottomSheet(
- context: context,
- backgroundColor: Colors.transparent,
- isDismissible: false,
- builder: (context) {
- return SwapProviderInitialPreferenceModal();
- }).then((val) {
- widget.exchangeViewModel.dismissDecentralizedExchangesPrompt();
- if (val is bool && val == true && !widget.exchangeViewModel.forceDecentralizedExchanges) {
- widget.exchangeViewModel.toggleForceDecentralizedExchanges();
- }
- });
- }
+ // if (!widget.exchangeViewModel.decentralizedExchangesPromptDismissed) {
+ // showMaterialModalBottomSheet(
+ // context: context,
+ // backgroundColor: Colors.transparent,
+ // isDismissible: false,
+ // builder: (context) {
+ // return SwapProviderInitialPreferenceModal();
+ // }).then((val) {
+ // widget.exchangeViewModel.dismissDecentralizedExchangesPrompt();
+ // if (val is bool && val == true && !widget.exchangeViewModel.forceDecentralizedExchanges) {
+ // widget.exchangeViewModel.toggleForceDecentralizedExchanges();
+ // }
+ // });
+ // }
final depositAddressController = depositKey.currentState!.addressController;
final depositAmountController = depositKey.currentState!.amountController;
@@ -1182,13 +1180,14 @@ class SwapAmountBoxState extends State<SwapAmountBox> {
});
if (res != null && res is SwapAddressSelectionResult) {
if (widget.isReceiverCard) {
+ widget.exchangeViewModel.selectedAddressBookWallet = res.walletInfo;
widget.exchangeViewModel.receiveAddress = res.address!;
- if (res.walletName != null) {
+ if (res.walletInfo?.name != null) {
if (res.accountName != null) {
widget.exchangeViewModel.receiveAddressDisplayName =
- "${res.walletName} → ${res.accountName}";
+ "${res.walletInfo!.name} → ${res.accountName}";
} else {
- widget.exchangeViewModel.receiveAddressDisplayName = res.walletName!;
+ widget.exchangeViewModel.receiveAddressDisplayName = res.walletInfo!.name;
}
}
} else if (res.address == null || res.address!.isEmpty) {
@@ -1196,7 +1195,7 @@ class SwapAmountBoxState extends State<SwapAmountBox> {
askForRefundAddress();
} else {
widget.exchangeViewModel.isSendFromExternal = false;
- switchToDepositWallet(res.walletName!);
+ switchToDepositWallet(res.walletInfo!.name);
}
}
}
diff --git a/lib/new-ui/widgets/coins_page/assets_history/assets_top_bar.dart b/lib/new-ui/widgets/coins_page/assets_history/assets_top_bar.dart
index 2e043f1..374319b 100644
--- a/lib/new-ui/widgets/coins_page/assets_history/assets_top_bar.dart
+++ b/lib/new-ui/widgets/coins_page/assets_history/assets_top_bar.dart
@@ -6,7 +6,6 @@ import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
import 'package:flutter/material.dart';
-import 'package:flutter_svg/svg.dart';
class AssetsTopBar extends StatelessWidget {
const AssetsTopBar({
@@ -98,5 +97,6 @@ class AssetsTopBar extends StatelessWidget {
if (tabs[selectedTab] == S.current.history) {
return S.current.filters;
}
+ return null;
}
}
diff --git a/lib/new-ui/widgets/coins_page/assets_history/history_trade_tile.dart b/lib/new-ui/widgets/coins_page/assets_history/history_trade_tile.dart
index 81f1cd6..b3d6dc7 100644
--- a/lib/new-ui/widgets/coins_page/assets_history/history_trade_tile.dart
+++ b/lib/new-ui/widgets/coins_page/assets_history/history_trade_tile.dart
@@ -70,23 +70,25 @@ class HistoryTradeTile extends StatelessWidget {
}
String _getIconPath(CryptoCurrency currency) {
- if (currency.iconPath != null) {
- return currency.iconPath!;
- }
+ try { // temporarily until we migrate from hive to sqlite and store the full currency object
+ if (currency.iconPath != null) {
+ return currency.iconPath!;
+ }
- if (currency.name.isNotEmpty) {
- final currencyFromName = CryptoCurrency.fromString(currency.name);
- if (currencyFromName.iconPath != null) {
- return currencyFromName.iconPath!;
+ if (currency.name.isNotEmpty) {
+ final currencyFromName = CryptoCurrency.fromString(currency.name);
+ if (currencyFromName.iconPath != null) {
+ return currencyFromName.iconPath!;
+ }
}
- }
- if (currency.title.isNotEmpty) {
- final currencyFromTitle = CryptoCurrency.fromString(currency.title);
- if (currencyFromTitle.iconPath != null) {
- return currencyFromTitle.iconPath!;
+ if (currency.title.isNotEmpty) {
+ final currencyFromTitle = CryptoCurrency.fromString(currency.title);
+ if (currencyFromTitle.iconPath != null) {
+ return currencyFromTitle.iconPath!;
+ }
}
- }
+ } catch (_) {}
//TODO approporiate fallback
return "";
diff --git a/lib/new-ui/widgets/swap_page/swap_address_selection_modal.dart b/lib/new-ui/widgets/swap_page/swap_address_selection_modal.dart
index 8b2e928..3400ef8 100644
--- a/lib/new-ui/widgets/swap_page/swap_address_selection_modal.dart
+++ b/lib/new-ui/widgets/swap_page/swap_address_selection_modal.dart
@@ -6,16 +6,16 @@ import 'package:cake_wallet/src/widgets/new_list_row/new_simple_checkbox.dart';
import 'package:cake_wallet/view_model/exchange/exchange_view_model.dart';
import 'package:cw_core/currency_for_wallet_type.dart';
import 'package:cw_core/wallet_info.dart';
+import 'package:cw_core/wallet_type.dart' show WalletType;
import 'package:flutter/material.dart';
-import 'package:flutter_svg/flutter_svg.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
class SwapAddressSelectionResult {
String? address;
- String? walletName;
+ WalletInfo? walletInfo;
String? accountName;
- SwapAddressSelectionResult({this.address, this.walletName, this.accountName});
+ SwapAddressSelectionResult({this.address, this.walletInfo, this.accountName});
}
class SwapAddressSelectionModal extends StatefulWidget {
@@ -52,8 +52,8 @@ class _SwapAddressSelectionModalState extends State<SwapAddressSelectionModal> {
? await widget.exchangeViewModel.receiveWallets
: await widget.exchangeViewModel.depositWallets;
for (final item in items) {
- if (item.type.toString() == "WalletType.monero") {
- accounts[item.id] = await widget.exchangeViewModel.addressesForWallet(item);
+ if (item.type == WalletType.monero) {
+ accounts[item.id] = await widget.exchangeViewModel.addressesForAccountsWallet(item);
}
}
setState(() {
@@ -107,10 +107,10 @@ class _SwapAddressSelectionModalState extends State<SwapAddressSelectionModal> {
final String currencyIconPath = walletTypeToCryptoCurrency(item.type).iconPath ?? "";
- final bool hasAccounts =
- item.type.toString() == "WalletType.monero" && widget.isSelectingReceiver;
+ final bool hasAccounts =
+ item.type == WalletType.monero && widget.isSelectingReceiver;
- List<WalletInfoAddressInfo>? accounts =
+ List<WalletInfoAddressInfo>? accounts =
hasAccounts ? this.accounts[item.id] : null;
return Padding(
@@ -123,7 +123,7 @@ class _SwapAddressSelectionModalState extends State<SwapAddressSelectionModal> {
onAddressChosen: (address, accountName) {
Navigator.of(context).pop(SwapAddressSelectionResult(
address: address,
- walletName: item.name,
+ walletInfo: item,
accountName: accountName));
},
),
diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart
index 1b0d63f..ab1dd71 100644
--- a/lib/store/settings_store.dart
+++ b/lib/store/settings_store.dart
@@ -716,7 +716,7 @@ abstract class SettingsStoreBase with Store {
reaction(
(_) => decentralizedExchangesPromptDismissed,
- (bool forceDecentralizedExchanges) => _sharedPreferences.setBool(
+ (bool decentralizedExchangesPromptDismissed) => _sharedPreferences.setBool(
PreferencesKey.decentralizedExchangesPromptDismissed,
decentralizedExchangesPromptDismissed));
diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart
index 90be323..d6854ac 100644
--- a/lib/view_model/exchange/exchange_view_model.dart
+++ b/lib/view_model/exchange/exchange_view_model.dart
@@ -9,6 +9,8 @@ import 'package:cake_wallet/bitcoin/bitcoin.dart';
import 'package:cake_wallet/core/amount_parsing_proxy.dart';
import 'package:cake_wallet/core/create_trade_result.dart';
import 'package:cake_wallet/core/fiat_conversion_service.dart';
+import 'package:cake_wallet/core/lightning_invoice_service.dart';
+import 'package:cake_wallet/core/utilities.dart';
import 'package:cake_wallet/core/wallet_change_listener_view_model.dart';
import 'package:cake_wallet/entities/calculate_fiat_amount.dart';
import 'package:cake_wallet/entities/exchange_api_mode.dart';
@@ -420,7 +422,7 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with
return await WalletInfo.selectList("type = ?", [type!.index]);
}
- Future<List<WalletInfoAddressInfo>> addressesForWallet(WalletInfo wallet) async {
+ Future<List<WalletInfoAddressInfo>> addressesForAccountsWallet(WalletInfo wallet) async {
final List<WalletInfoAddressInfo> ret = [];
final addresses = await wallet.getAddressInfos();
for (var list in addresses.values) {
@@ -554,6 +556,8 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with
calculateForcedProviderRate();
}
+ WalletInfo? selectedAddressBookWallet;
+
@observable
double forcedProviderRate = 0.0;
@@ -964,22 +968,6 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with
}
}
- if (depositCurrency == CryptoCurrency.btcln &&
- depositAddress == wallet.walletAddresses.addressForExchange) {
- final invoice = await bitcoin!.getLightningInvoice(wallet, BigInt.zero);
- if (invoice != null) {
- depositAddress = invoice;
- }
- }
-
- if (receiveCurrency == CryptoCurrency.btcln &&
- receiveAddress == wallet.walletAddresses.addressForExchange) {
- final invoice = await bitcoin!.getLightningInvoice(wallet, BigInt.zero);
- if (invoice != null) {
- receiveAddress = invoice;
- }
- }
-
late final Map<double, ExchangeProvider> providers;
if (forcedProvider != null) {
providers = {forcedProviderRate: forcedProvider!};
@@ -1000,6 +988,32 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with
}
try {
+ if (selectedAddressBookWallet?.type == WalletType.bitcoin) {
+ final _walletAddresses = await selectedAddressBookWallet!.getAddresses();
+
+ // if receive currency is lightning pick the lightning address
+ // if normal bitcoin, then pick the segwit address
+ if (receiveCurrency == CryptoCurrency.btcln) {
+ final lightningAddressOfWallet =
+ _walletAddresses.entries.firstWhereOrNull((e) => e.value.contains("LN"))?.key;
+ if (lightningAddressOfWallet != null) {
+ receiveAddress = lightningAddressOfWallet;
+ }
+ }
+ if (receiveCurrency == CryptoCurrency.btc) {
+ final segwitAddressOfWallet =
+ _walletAddresses.entries.firstWhereOrNull((e) => e.value.contains("P2WPKH"))?.key;
+ if (segwitAddressOfWallet != null) {
+ receiveAddress = segwitAddressOfWallet;
+ }
+ }
+ }
+
+ // parse Lightning address to bolt11 invoice
+ if (receiveAddress.contains("@")) {
+ receiveAddress = await getBolt11FromLightingAddress(receiveAddress) ?? receiveAddress;
+ }
+
// snapshot of providers to avoid concurrent modification issues
final providersSnapshot = providers.values.toList();
final ratesSnapshot = providers.keys.toList();
diff --git a/lib/view_model/send/output.dart b/lib/view_model/send/output.dart
index 80640f9..9c88d70 100644
--- a/lib/view_model/send/output.dart
+++ b/lib/view_model/send/output.dart
@@ -109,7 +109,7 @@ abstract class OutputBase with Store {
if (fiatAmount.split(".").last.length <= digits) {
return fiatAmount;
}
- return double.parse(fiatAmount.replaceAll(",", "")).toStringAsPrecision(digits);
+ return double.tryParse(fiatAmount.replaceAll(",", ""))?.toStringAsPrecision(digits) ?? '0.0';
}
@observable
diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh
index 3e9720f..4857b6b 100644
--- a/scripts/android/app_env.sh
+++ b/scripts/android/app_env.sh
@@ -14,15 +14,15 @@ TYPES=($MONERO_COM $CAKEWALLET)
APP_ANDROID_TYPE=$1
MONERO_COM_NAME="Monero.com"
-MONERO_COM_VERSION="6.0.1"
-MONERO_COM_BUILD_NUMBER=4154
+MONERO_COM_VERSION="6.0.2"
+MONERO_COM_BUILD_NUMBER=4155
MONERO_COM_BUNDLE_ID="com.monero.app"
MONERO_COM_PACKAGE="com.monero.app"
MONERO_COM_SCHEME="monero.com"
CAKEWALLET_NAME="Cake Wallet"
-CAKEWALLET_VERSION="6.0.1"
-CAKEWALLET_BUILD_NUMBER=4405
+CAKEWALLET_VERSION="6.0.2"
+CAKEWALLET_BUILD_NUMBER=4406
CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet"
CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet"
CAKEWALLET_SCHEME="cakewallet"
diff --git a/scripts/ios/app_env.sh b/scripts/ios/app_env.sh
index 5376adb..112cb6c 100644
--- a/scripts/ios/app_env.sh
+++ b/scripts/ios/app_env.sh
@@ -12,13 +12,13 @@ TYPES=($MONERO_COM $CAKEWALLET)
APP_IOS_TYPE=$1
MONERO_COM_NAME="Monero.com"
-MONERO_COM_VERSION="6.0.1"
-MONERO_COM_BUILD_NUMBER=159
+MONERO_COM_VERSION="6.0.2"
+MONERO_COM_BUILD_NUMBER=160
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
CAKEWALLET_NAME="Cake Wallet"
-CAKEWALLET_VERSION="6.0.1"
-CAKEWALLET_BUILD_NUMBER=407
+CAKEWALLET_VERSION="6.0.2"
+CAKEWALLET_BUILD_NUMBER=408
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
diff --git a/test/core/lightning_invoice_service_test.dart b/test/core/lightning_invoice_service_test.dart
new file mode 100644
index 0000000..edf0329
--- /dev/null
+++ b/test/core/lightning_invoice_service_test.dart
@@ -0,0 +1,31 @@
+import "package:cake_wallet/core/lightning_invoice_service.dart";
+import "package:cw_core/lnurl.dart";
+import "package:cw_core/utils/proxy_wrapper.dart";
+import "package:cw_core/utils/tor/abstract.dart";
+import "package:flutter_test/flutter_test.dart";
+
+Future<void> main() async {
+ CakeTor.instance = await CakeTorInstance.getInstance();
+
+ group("lightning_invoice_service", () {
+ test("Should resolve an empty Bolt11 invoice konsti@cake.cash", () async {
+ final invoice = await getBolt11FromLightingAddress("konsti@cake.cash");
+
+ expect(invoice, isNotNull);
+ expect(isBolt11ZeroInvoice(invoice!), isTrue);
+ });
+
+ test("Should not resolve an empty Bolt11 invoice viksharma@cluborange.org", () async {
+ final invoice = await getBolt11FromLightingAddress("viksharma@cluborange.org");
+
+ expect(invoice, isNull);
+ });
+
+ test("Should resolve an Bolt11 invoice viksharma@cluborange.org", () async {
+ final invoice =
+ await getBolt11FromLightingAddress("viksharma@cluborange.org", amount: 1000000000);
+
+ expect(invoice, isNotNull);
+ });
+ });
+}
diff --git a/tool/translate_changelog.dart b/tool/translate_changelog.dart
index 0c24c75..e044cc2 100644
--- a/tool/translate_changelog.dart
+++ b/tool/translate_changelog.dart
@@ -40,9 +40,9 @@ void main() async {
}
out.add({
- "icon": itemMap["icon"]! as String,
- "title": newTitle,
- "description": newDescription,
+ if (itemMap["icon"] != null) "icon": itemMap["icon"] as String,
+ if (itemMap["title"] != null) "title": newTitle,
+ if (itemMap["description"] != null) "description": newDescription,
});
currentItem++;
Why this scored 38/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.