diff --git a/common/src/main/res/values-ar/strings.xml b/common/src/main/res/values-ar/strings.xml index 2bd410746..aede2e380 100644 --- a/common/src/main/res/values-ar/strings.xml +++ b/common/src/main/res/values-ar/strings.xml @@ -345,6 +345,9 @@ سيولة غير كافية رسوم حوض السيولة يذهب جزء من كل صفقة إلى موفري السيولة كحوافز للبروتوكول. + Synthetic token fee + Total fee + Total fee consists on fee سوق يضمن توجيه السيولة SMART أفضل سعر لأي معاملة من خلال الجمع بين أفضل خيارات الأسعار فقط من جميع الأسواق المتاحة. عند توفرها ، سيتم استخدام Token Bonding Curve (TBC) للسيولة طالما أن سعر الأصل في المتناول أكثر من أي مصادر أخرى ، حيث يتم استخدام مجمع XYK. TBC - الشراء فقط من منحنى الترابط المميز (السوق الأولية). هناك احتمال أن يصبح السعر غير مغري مقارنة بتجمع XYK (السوق الثانوية) ، ولكن القيمة المستلمة من المكافآت المكتسبة قد تكون أكثر ملاءمة بمرور الوقت. diff --git a/common/src/main/res/values-az/strings.xml b/common/src/main/res/values-az/strings.xml index b1ac07115..1e376f705 100644 --- a/common/src/main/res/values-az/strings.xml +++ b/common/src/main/res/values-az/strings.xml @@ -341,6 +341,9 @@ Qeyri-kifayət qədər likvidlik LP haqqı Hər bir ticarətin bir hissəsi protokol təşviqi olaraq likvidlik təminatçılarına keçir. + Sintetik token haqqı + Ümumi ödəniş + Ümumi ödəniş ödənişdən ibarətdir Bazar SMART liquidity routing ensures the best price for any transaction by combining only the best price options from all available markets. When available, Token Bonding Curve (TBC) will be used for liquidity as long as the asset price is more affordable than from other sources, upon which the XYK pool is utilized. TBC — buying only from the Token Bonding Curve (Primary Market). There is a possibility that the price can become unfavorable compared to the XYK pool (Secondary Market), but the value received from the vested rewards might turn out to be much more favorable over time. diff --git a/common/src/main/res/values-de/strings.xml b/common/src/main/res/values-de/strings.xml index b4ca69980..61c992683 100644 --- a/common/src/main/res/values-de/strings.xml +++ b/common/src/main/res/values-de/strings.xml @@ -341,6 +341,9 @@ Unzureichende Liquidität LP-Gebühr Ein Teil jeder Trade geht als Protokollanreiz an die Liquiditätsanbieter. + Synthetic token fee + Total fee + Total fee consists on fee Markt SMART Liquiditätsrouting gewährleistet den besten Preis für jede Transaktion, indem es nur die besten Preisoptionen aus allen verfügbaren Märkten kombiniert. Wenn verfügbar, wird die Token Bonding Curve (TBC) für die Liquidität verwendet, solange der Preis des Assets günstiger ist als aus anderen Quellen, auf die der XYK-Pool zurückgreift. TBC - Kauf nur von der Token Bonding Curve (Primärmarkt). Es besteht die Möglichkeit, dass der Preis im Vergleich zum XYK-Pool (Sekundärmarkt) ungünstig werden kann, aber der Wert, den man durch die verstärkten Rewards erhält, könnte sich im Laufe der Zeit als viel günstiger erweisen. diff --git a/common/src/main/res/values-es/strings.xml b/common/src/main/res/values-es/strings.xml index 240783435..e2124c330 100644 --- a/common/src/main/res/values-es/strings.xml +++ b/common/src/main/res/values-es/strings.xml @@ -341,6 +341,9 @@ Liquidez insuficiente Tarifa LP Una porción de cada trade va a los proveedores de liquidez como incentivo del protocolo + Synthetic token fee + Total fee + Total fee consists on fee Mercado SMART liquidity routing ensures the best price for any transaction by combining only the best price options from all available markets. When available, Token Bonding Curve (TBC) will be used for liquidity as long as the asset price is more affordable than from other sources, upon which the XYK pool is utilized. TBC — buying only from the Token Bonding Curve (Primary Market). There is a possibility that the price can become unfavorable compared to the XYK pool (Secondary Market), but the value received from the vested rewards might turn out to be much more favorable over time. diff --git a/common/src/main/res/values-fa/strings.xml b/common/src/main/res/values-fa/strings.xml index 8f88ca0fb..98ed727c2 100644 --- a/common/src/main/res/values-fa/strings.xml +++ b/common/src/main/res/values-fa/strings.xml @@ -341,6 +341,9 @@ نقدینگی ناکافی هزینه LP بخشی از هر معامله به عنوان مشوق پروتکل به ارائه دهندگان نقدینگی می‌رسد. + Synthetic token fee + Total fee + Total fee consists on fee بازار مسیریابی نقدینگی SMART با ترکیب بهترین گزینه‌های قیمت از همه بازارهای موجود، بهترین قیمت را برای هر معامله تضمین می‌کند. در صورت امکان Token Bonding Curve (TBC) برای نقدینگی استفاده خواهد شد تا زمانی که قیمت دارایی مقرون به صرفه‌تر از منابع دیگر باشد، که در این حالت از استخر XYK استفاده می‌شود. TBC - خرید فقط از Token Bonfing Curve (بازار اولیه). ممکن است قیمت در مقایسه با مخزن XYK (بازار ثانویه) نامطلوب تر باشد، اما ارزش دریافتی از پاداش‌های اختصاص داده شده ممکن است در طول زمان بسیار مطلوب تر شود. diff --git a/common/src/main/res/values-fi/strings.xml b/common/src/main/res/values-fi/strings.xml index db738371c..dccd77ce0 100644 --- a/common/src/main/res/values-fi/strings.xml +++ b/common/src/main/res/values-fi/strings.xml @@ -341,6 +341,9 @@ Riittämätön likviditeetti LP-maksu Osa jokaisesta kaupasta menee likviditeetin tarjoajille protokollakannustimena. + Synthetic token fee + Total fee + Total fee consists on fee Market SMART likviditeetin reititys varmistaa parhaan hinnan jokaiselle tapahtumalle, yhdistämällä vain parhaat hintavaihtoehdot kaikilta saatavilla olevilta markkinoilta. Token Bonding Curvea (TBC) käytetään mahdollisuuksien mukaan likviditeettiin niin kauan kun resurssien hinta on edullisempi kuin muista lähteistä, jolloin taas hyödynnetään XYK-poolia. TBC – ostaminen vain Token Bonding Curvesta (ensisijainen markkina). On mahdollista, että hinnasta tulee epäedullinen verrattuna XYK-pooliin (toissijainen markkina), mutta saavutetuista palkkioista saatu arvo saattaa osoittautua paljon edullisemmaksi ajan myötä. diff --git a/common/src/main/res/values-fr/strings.xml b/common/src/main/res/values-fr/strings.xml index 01cb982e5..2e1691520 100644 --- a/common/src/main/res/values-fr/strings.xml +++ b/common/src/main/res/values-fr/strings.xml @@ -341,6 +341,9 @@ Liquidité insuffisante Frais de LP Une partie de chaque transaction est reversée aux fournisseurs de liquidités à titre d\'incitation de la part du protocole + Synthetic token fee + Total fee + Total fee consists on fee Marché Le routage de la liquidité SMART garantit le meilleur prix pour toute transaction en combinant uniquement les meilleures options de prix de tous les marchés disponibles. Lorsqu\'elle est disponible, la courbe de liaison de jeton (TBC) sera utilisée pour la liquidité tant que le prix de l\'actif est plus abordable que celui des autres sources, sur lesquelles le pool XYK est utilisé. TBC - achat uniquement à partir de la courbe de liaison de jeton (marché primaire). Il est possible que le prix devienne défavorable par rapport au pool XYK (marché secondaire), mais la valeur reçue des récompenses acquises pourrait s\'avérer beaucoup plus favorable au fil du temps. diff --git a/common/src/main/res/values-hi-rIN/strings.xml b/common/src/main/res/values-hi-rIN/strings.xml index 3cd1d399b..911daf99f 100644 --- a/common/src/main/res/values-hi-rIN/strings.xml +++ b/common/src/main/res/values-hi-rIN/strings.xml @@ -341,6 +341,9 @@ अपर्याप्त Liquidity LP शुल्क प्रत्येक व्यापार का एक हिस्सा एक प्रोटोकॉल प्रोत्साहन के रूप में Liquidity प्रदाताओं को जाता है। + Synthetic token fee + Total fee + Total fee consists on fee बाज़ार स्मार्ट लिक्विडिटी रूटिंग सभी उपलब्ध बाजारों से केवल सर्वोत्तम मूल्य विकल्पों को मिलाकर किसी भी लेन-देन के लिए सर्वोत्तम मूल्य सुनिश्चित करता है। उपलब्ध होने पर, टोकन बॉन्डिंग कर्व (TBC) का उपयोग तरलता के लिए तब तक किया जाएगा जब तक कि संपत्ति की कीमत अन्य स्रोतों की तुलना में अधिक सस्ती हो, जिस पर XYK पूल का उपयोग किया जाता है। टीबीसी - केवल टोकन बॉन्डिंग वक्र (प्राथमिक बाजार) से खरीदना। एक संभावना है कि मूल्य XYK पूल (द्वितीयक बाजार) की तुलना में प्रतिकूल हो सकता है, लेकिन निहित पुरस्कारों से प्राप्त मूल्य समय के साथ और अधिक अनुकूल हो सकता है। diff --git a/common/src/main/res/values-in/strings.xml b/common/src/main/res/values-in/strings.xml index 4a18bdb8e..c7df47b36 100644 --- a/common/src/main/res/values-in/strings.xml +++ b/common/src/main/res/values-in/strings.xml @@ -340,6 +340,9 @@ Likuiditas tidak mencukupi Biaya LP Sebagian dari setiap perdagangan diberikan kepada penyedia likuiditas sebagai insentif protokol. + Synthetic token fee + Total fee + Total fee consists on fee Pasar SMART liquidity routing ensures the best price for any transaction by combining only the best price options from all available markets. When available, Token Bonding Curve (TBC) will be used for liquidity as long as the asset price is more affordable than from other sources, upon which the XYK pool is utilized. TBC — buying only from the Token Bonding Curve (Primary Market). There is a possibility that the price can become unfavorable compared to the XYK pool (Secondary Market), but the value received from the vested rewards might turn out to be much more favorable over time. diff --git a/common/src/main/res/values-iw/strings.xml b/common/src/main/res/values-iw/strings.xml index af19abba2..5d43449e4 100644 --- a/common/src/main/res/values-iw/strings.xml +++ b/common/src/main/res/values-iw/strings.xml @@ -343,6 +343,9 @@ אין מספיק נזילות עמלת מאגר נזילות חלק מכל עסקה הולך לספקי נזילות כתמריץ פרוטוקול. + Synthetic token fee + Total fee + Total fee consists on fee שוק ניתוב נזילות SMART מבטיח את המחיר הטוב ביותר לכל טרנזקציה על ידי שילוב אפשרויות המחיר הטובות ביותר בלבד מכל השווקים הזמינים. כאשר זמין, עקומת צירוף הטוקנים (TBC) תשמש לנזילות כל עוד מחיר הנכס משתלם יותר מאשר ממקורות אחרים, שעליהם מנוצל מאגר XYK. TBC - קנייה רק מעקומת צירוף הטוקנים (השוק העיקרי). קיימת אפשרות שהמחיר יכול להפוך לבלתי משתלם בהשוואה למאגר XYK (שוק משני), אך הערך המתקבל מהתגמולים המוענקים לאורך זמן עשוי להתברר כמשתלם הרבה יותר לטווח ארוך. diff --git a/common/src/main/res/values-ja/strings.xml b/common/src/main/res/values-ja/strings.xml index 33dbc024c..b33c0dd3b 100644 --- a/common/src/main/res/values-ja/strings.xml +++ b/common/src/main/res/values-ja/strings.xml @@ -340,6 +340,9 @@ 流動性不足 LP手数料 各取引の一部は、インセンティブとして流動性プロバイダー(LP)に送られます + Synthetic token fee + Total fee + Total fee consists on fee 市場 SMART流動性ルーティングは、利用可能なすべての市場から最良の価格オプションだけ組み合わせることで、あらゆる取引の最良の価格を保証します。XYKプールや他のプールが利用される場合より資産価格が手頃であれば、可能な限りトークン・ボンディング・カーブ(TBC)が流動性のために使用されます TBC — トークン・ボンディング・カーブ(一次市場)からのみ購入します。 XYKプール(二次市場)に比べて価格が不利になる可能性もありますが、既得の報酬から受け取る価値が、時間の経過とともにはるかに有利になる可能性があります diff --git a/common/src/main/res/values-ms-rMY/strings.xml b/common/src/main/res/values-ms-rMY/strings.xml index 8c705e741..7d1762f2e 100644 --- a/common/src/main/res/values-ms-rMY/strings.xml +++ b/common/src/main/res/values-ms-rMY/strings.xml @@ -340,6 +340,9 @@ Kecairan tidak mencukupi Bayaran LP Sebahagian daripada setiap dagangan diberikan kepada penyedia kecairan sebagai insentif protokol. + Synthetic token fee + Total fee + Total fee consists on fee Pasaran Penghalaan kecairan SMART memastikan harga terbaik untuk sebarang transaksi dengan menggabungkan hanya pilihan harga terbaik dari semua pasaran yang ada. Apabila tersedia, Token Bonding Curve (TBC) akan digunakan untuk kecairan selagi harga aset lebih berpatutan daripada sumber lain, di mana kolam XYK digunakan. TBC — membeli hanya daripada Lengkung Ikatan Token (Pasaran Utama). Terdapat kemungkinan bahawa harga boleh menjadi tidak menguntungkan berbanding dengan kolam XYK (Pasaran Sekunder), tetapi nilai yang diterima daripada ganjaran terletak hak mungkin berubah menjadi lebih baik dari masa ke masa. diff --git a/common/src/main/res/values-nb/strings.xml b/common/src/main/res/values-nb/strings.xml index d74ddaced..5846ff0db 100644 --- a/common/src/main/res/values-nb/strings.xml +++ b/common/src/main/res/values-nb/strings.xml @@ -341,6 +341,9 @@ Utilstrekkelig likviditet LP -avgift En del av hver handel går til likviditetsleverandører som et protokollinsentiv. + Synthetic token fee + Total fee + Total fee consists on fee Marked SMART liquidity routing ensures the best price for any transaction by combining only the best price options from all available markets. When available, Token Bonding Curve (TBC) will be used for liquidity as long as the asset price is more affordable than from other sources, upon which the XYK pool is utilized. TBC — buying only from the Token Bonding Curve (Primary Market). There is a possibility that the price can become unfavorable compared to the XYK pool (Secondary Market), but the value received from the vested rewards might turn out to be much more favorable over time. diff --git a/common/src/main/res/values-nl/strings.xml b/common/src/main/res/values-nl/strings.xml index d29fc1d66..f22cfda5d 100644 --- a/common/src/main/res/values-nl/strings.xml +++ b/common/src/main/res/values-nl/strings.xml @@ -341,6 +341,9 @@ Onvoldoende liquiditeit LP Vergoeding Een deel van elke transactie gaat naar liquiditeitsverschaffers als aanmoediging van het protocol. + Synthetic token fee + Total fee + Total fee consists on fee Markt SMART liquiditeitsroutering zorgt voor de beste prijs voor elke transactie door alleen de beste prijsopties uit alle beschikbare markten te combineren. Indien beschikbaar, zal de Token Bonding Curve (TBC) worden gebruikt voor liquiditeit zolang de activaprijs betaalbaarder is dan uit andere bronnen, waarop de XYK-pool wordt gebruikt. TBC - alleen kopen van de Token Bonding Curve (primaire markt). Er is een mogelijkheid dat de prijs ongunstig kan worden in vergelijking met de XYK-pool (secundaire markt), maar de waarde die wordt ontvangen van de gevestigde beloningen kan in de loop van de tijd veel gunstiger blijken te zijn. diff --git a/common/src/main/res/values-pt/strings.xml b/common/src/main/res/values-pt/strings.xml index 35966f0e1..4df46b280 100644 --- a/common/src/main/res/values-pt/strings.xml +++ b/common/src/main/res/values-pt/strings.xml @@ -341,6 +341,9 @@ Liquidez insuficiente Taxa de LP Uma porção de cada transação vai para os provedores de liquidez, como incentivo do protocolo. + Synthetic token fee + Total fee + Total fee consists on fee Mercado O roteamento de liquidez SMART assegura o melhor preço para qualquer transação, combinando apenas as melhores opções de preços de todos os mercados acessíveis. Quando disponível, a Curva Agregadora de Tokens (TBC) será usada para liquidez, desde que o preço do ativo seja mais económico do que o de outras fontes, que utilizam a pool XYK. TBC - compra apenas a partir da Curva Agregadora de Tokens (Mercado Primário). Há a possibilidade de o preço se tornar desfavorável em comparação com a pool XYK (Mercado Secundário), mas o valor das recompensas recebido pode vir a revelar-se muito mais favorável ao longo do tempo. diff --git a/common/src/main/res/values-ru/strings.xml b/common/src/main/res/values-ru/strings.xml index 52a355e04..65b027a7f 100644 --- a/common/src/main/res/values-ru/strings.xml +++ b/common/src/main/res/values-ru/strings.xml @@ -344,6 +344,9 @@ Недостаточная ликвидность Комиссия LP Часть каждой сделки является награждением для поставщиков ликвидности. + Комиссия за синтетический токен + Общая комиссия + Общая комиссия состоит из комиссии Рынок Маршрутизация ликвидности SMART обеспечивает лучшую цену для любой транзакции, комбинируя только лучшие варианты цены со всех доступных рынков. При наличии TBC будет использоваться для обеспечения ликвидности до тех пор, пока цена актива будет более доступной, чем из других источников, на которых используется пул XYK. TBC(Token Bonding Curve) — покупка только по кривой связывания токенов (первичный рынок). Есть вероятность того, что цена может стать невыгодной по сравнению с пулом XYK (вторичный рынок), но ценность, полученная от закрепленных вознаграждений, со временем может оказаться гораздо более выгодной. diff --git a/common/src/main/res/values-sr/strings.xml b/common/src/main/res/values-sr/strings.xml index eae64df61..56ce6511b 100644 --- a/common/src/main/res/values-sr/strings.xml +++ b/common/src/main/res/values-sr/strings.xml @@ -342,6 +342,9 @@ Недовољна ликвидност Naknada za likvidnost Deo svake transakcije ide provajderima likvidnosti kao protokolarni podsticaj. + Synthetic token fee + Total fee + Total fee consists on fee Tržište СМАРТ усмеравање ликвидности обезбеђује најбољу цену за било коју трансакцију комбиновањем само најбољих опција цена са свих доступних тржишта. Када је доступна, крива везивања токена (ТБЦ) ће се користити за ликвидност све док је цена средства приступачнија него из других извора, на основу којих се користи КСИК фонд. ТБЦ — куповина само са криве везивања токена (примарно тржиште). Постоји могућност да цена може постати неповољнија у поређењу са КСИК фондом (секундарно тржиште), али вредност добијена од стечених награда може се временом показати много повољнијом. diff --git a/common/src/main/res/values-tr/strings.xml b/common/src/main/res/values-tr/strings.xml index 242e2c9c3..fa85f8d10 100644 --- a/common/src/main/res/values-tr/strings.xml +++ b/common/src/main/res/values-tr/strings.xml @@ -341,6 +341,9 @@ Yetersiz likidite LP Ücreti Her takasın bir kısmı protokol teşviki olarak likidite sağlayıcılarına gider. + Synthetic token fee + Total fee + Total fee consists on fee Piyasa SMART likidite yönlendirmesi, mevcut piyasalardaki en iyi fiyat oranlarını birleştirerek herhangi bir işlem için en iyi fiyatı bulur. Mevcut olduğunda, fiyat, XYK havuzunun kullanıldığı diğer kaynaklardan daha uygun olduğu sürece Token Tahvil Eğrisi (TBC), likidite için kullanılacaktır. TBC — sadece Token Tahvil Eğrisinden (Birincil Piyasadan) satın alınması. Fiyat, XYK havuzuna (İkincil Piyasaya) göre daha olumsuz olabilir, ama bir süre sonra kilidi açılan ödüllerden gelen değer, daha olumlu olabilir. diff --git a/common/src/main/res/values-vi/strings.xml b/common/src/main/res/values-vi/strings.xml index 01ee4c10e..450249e3e 100644 --- a/common/src/main/res/values-vi/strings.xml +++ b/common/src/main/res/values-vi/strings.xml @@ -340,6 +340,9 @@ Không đủ thanh khoản Phí thanh khoản Một phần của mỗi giao dịch được chuyển đến các nhà cung cấp thanh khoản như một biện pháp khuyến khích. + Synthetic token fee + Total fee + Total fee consists on fee Thị trường SMART liquidity routing đảm bảo giá tốt nhất cho giao dịch bất kỳ bằng cách kết hợp mức giá tốt nhất hiện có trên thị trường. Khi thuận lợi, Token Bonding Curve (TBC) sẽ được dùng để tạo thanh khoản miễn là giá của tài sản hợp lý hơn các nguồn khác như pool (XYK). TBC - chỉ mua từ Token Bonding Curve (Primary Market). Giá có thể trở nên bất lợi so với XYK pool (Secondary Market), nhưng về lâu dài giá trị nhận được từ phần thưởng có thể lớn hơn nhiều. diff --git a/common/src/main/res/values-zh-rCN/strings.xml b/common/src/main/res/values-zh-rCN/strings.xml index ce3eb039a..47c0a3cb7 100644 --- a/common/src/main/res/values-zh-rCN/strings.xml +++ b/common/src/main/res/values-zh-rCN/strings.xml @@ -340,6 +340,9 @@ 流动性不足 流动性提供者费用 每笔交易的一部分作为协议激励奖励流动性提供者。 + Synthetic token fee + Total fee + Total fee consists on fee 市场 智能流动性路由通过从所有可用市场中仅选择最佳价格选项,确保任何交易的最佳价格。如果可用,将使用代币绑定曲线(TBC)提供流动性,只要资产价格比其他来源更实惠,否则将使用XYK池。 TBC - 仅从代币绑定曲线(一级市场)购买。价格可能会比XYK池(二级市场)不利,但随着时间的推移,从归属奖励中获得的价值可能会更有利。 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index b0e8fb1f3..5bc5d5d00 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -340,6 +340,9 @@ 流動性不足 LP費用 每筆交易的一部分 作為協議激勵流向流動性提供者。 + Synthetic token fee + Total fee + Total fee consists on fee 市場 SMART 流動性路由通過僅結合所有可用市場的最佳價格選項來確保任何交易的最佳價格。如果可用,代幣綁定曲線 (TBC) 將用於流動性,只要資產價格比使用 XYK 池的其他來源更實惠。 TBC — 僅從 Token Bonding Curve(一級市場)購買。與 XYK 池(二級市場)相比,價格有可能變得不利,但隨著時間的推移,從既得獎勵中獲得的價值可能會變得更加有利。 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 200ff564f..d9d8eebe8 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -341,6 +341,9 @@ Insufficient liquidity LP Fee A portion of each trade goes to liquidity providers as a protocol incentive. + Synthetic token fee + Total fee + Total fee consists on fee Market SMART liquidity routing ensures the best price for any transaction by combining only the best price options from all available markets. When available, Token Bonding Curve (TBC) will be used for liquidity as long as the asset price is more affordable than from other sources, upon which the XYK pool is utilized. TBC — buying only from the Token Bonding Curve (Primary Market). There is a possibility that the price can become unfavorable compared to the XYK pool (Secondary Market), but the value received from the vested rewards might turn out to be much more favorable over time. diff --git a/feature_polkaswap_api/src/main/java/jp/co/soramitsu/feature_polkaswap_api/domain/model/SwapDetails.kt b/feature_polkaswap_api/src/main/java/jp/co/soramitsu/feature_polkaswap_api/domain/model/SwapDetails.kt index 29600ebf8..1c30739cd 100644 --- a/feature_polkaswap_api/src/main/java/jp/co/soramitsu/feature_polkaswap_api/domain/model/SwapDetails.kt +++ b/feature_polkaswap_api/src/main/java/jp/co/soramitsu/feature_polkaswap_api/domain/model/SwapDetails.kt @@ -44,8 +44,11 @@ data class SwapDetails( val networkFee: BigDecimal, val dex: PoolDex, val swapRoute: List? = null, + val feeMode: SwapFeeMode, ) +enum class SwapFeeMode { SYNTHETIC, NON_SYNTHETIC, BOTH } + data class SwapQuote( val amount: BigDecimal, val fee: BigDecimal, diff --git a/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/domain/SwapInteractorImpl.kt b/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/domain/SwapInteractorImpl.kt index 82f947b46..5963a8ff8 100644 --- a/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/domain/SwapInteractorImpl.kt +++ b/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/domain/SwapInteractorImpl.kt @@ -52,6 +52,8 @@ import jp.co.soramitsu.feature_polkaswap_api.domain.interfaces.PolkaswapReposito import jp.co.soramitsu.feature_polkaswap_api.domain.interfaces.PolkaswapSubscriptionRepository import jp.co.soramitsu.feature_polkaswap_api.domain.interfaces.SwapInteractor import jp.co.soramitsu.feature_polkaswap_api.domain.model.SwapDetails +import jp.co.soramitsu.feature_polkaswap_api.domain.model.SwapFeeMode +import jp.co.soramitsu.sora.substrate.runtime.SubstrateOptionsProvider import kotlin.math.max import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.Flow @@ -80,6 +82,7 @@ class SwapInteractorImpl( private var poolReservesFlowToken = MutableStateFlow?>(null) private val availableMarkets = mutableMapOf>() private var swapNetworkFee: BigDecimal? = null + private val syntheticRegex = SubstrateOptionsProvider.syntheticTokenRegex.toRegex() override suspend fun fetchSwapNetworkFee(feeToken: Token): BigDecimal { return swapNetworkFee ?: ( @@ -151,9 +154,18 @@ class SwapInteractorImpl( swapQuote.first.route?.mapNotNull { assetsRepository.getToken(it)?.symbol }, + getFeeMode(swapQuote.first.route), ) } + private fun getFeeMode(ids: List?): SwapFeeMode { + if (ids == null) return SwapFeeMode.NON_SYNTHETIC + val withoutxst = ids.filter { it != SubstrateOptionsProvider.xstTokenId } + if (withoutxst.all { it.matches(syntheticRegex) }) return SwapFeeMode.SYNTHETIC + if (withoutxst.all { it.matches(syntheticRegex).not() }) return SwapFeeMode.NON_SYNTHETIC + return SwapFeeMode.BOTH + } + override fun setSwapMarket(market: Market) { selectedSwapMarket.value = market } diff --git a/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/components/compose/SwapMainScreen.kt b/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/components/compose/SwapMainScreen.kt index d7f1e8747..73c9cdfad 100644 --- a/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/components/compose/SwapMainScreen.kt +++ b/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/components/compose/SwapMainScreen.kt @@ -219,8 +219,8 @@ internal fun SwapMainScreen( if (state.details.lpFee.isNotEmpty()) { Spacer(modifier = Modifier.size(Dimens.x2)) DetailsItem( - text = stringResource(id = R.string.polkaswap_liqudity_fee), - hint = stringResource(id = R.string.polkaswap_liqudity_fee_info), + text = stringResource(id = state.details.lpFeeTitle), + hint = stringResource(id = state.details.lpFeeHint), value1 = state.details.lpFee, ) } diff --git a/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/screens/swap/SwapViewModel.kt b/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/screens/swap/SwapViewModel.kt index 9b13c36a0..216814153 100644 --- a/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/screens/swap/SwapViewModel.kt +++ b/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/screens/swap/SwapViewModel.kt @@ -73,6 +73,7 @@ import jp.co.soramitsu.feature_assets_api.presentation.launcher.AssetsRouter import jp.co.soramitsu.feature_main_api.launcher.MainRouter import jp.co.soramitsu.feature_polkaswap_api.domain.interfaces.SwapInteractor import jp.co.soramitsu.feature_polkaswap_api.domain.model.SwapDetails +import jp.co.soramitsu.feature_polkaswap_api.domain.model.SwapFeeMode import jp.co.soramitsu.feature_polkaswap_impl.presentation.states.SwapMainState import jp.co.soramitsu.feature_polkaswap_impl.presentation.states.defaultSwapDetailsState import jp.co.soramitsu.feature_wallet_api.domain.interfaces.WalletInteractor @@ -763,42 +764,49 @@ class SwapViewModel @AssistedInject constructor( minmaxToken = _swapMainState.value.tokenFromState?.token maxMinToken = _swapMainState.value.tokenToState?.token } + val (title, desc) = when (details.feeMode) { + SwapFeeMode.SYNTHETIC -> R.string.polkaswap_liquidity_synthetic_fee to R.string.polkaswap_liqudity_fee_info + SwapFeeMode.NON_SYNTHETIC -> R.string.polkaswap_liqudity_fee to R.string.polkaswap_liqudity_fee_info + SwapFeeMode.BOTH -> R.string.polkaswap_liquidity_total_fee to R.string.polkaswap_liquidity_total_fee_desc + } _swapMainState.value = _swapMainState.value.copy( details = _swapMainState.value.details.copy( transactionFee = feeToken().printBalance( details.networkFee, numbersFormatter, - AssetHolder.ROUNDING + AssetHolder.ROUNDING, ), transactionFeeFiat = feeToken().printFiat( details.networkFee, - numbersFormatter + numbersFormatter, ), priceFromTo = p1, priceFromToTitle = "%s / %s".format( maxMinToken?.symbol.orEmpty(), - minmaxToken?.symbol.orEmpty() + minmaxToken?.symbol.orEmpty(), ), priceToFrom = p2, priceToFromTitle = "%s / %s".format( minmaxToken?.symbol.orEmpty(), - maxMinToken?.symbol.orEmpty() + maxMinToken?.symbol.orEmpty(), ), lpFee = feeToken().printBalance( details.liquidityFee, numbersFormatter, - AssetHolder.ROUNDING + AssetHolder.ROUNDING, ), minmaxTitle = minmaxTitle, minmaxHint = minmaxHint, minmaxValue = minmaxToken?.printBalance( details.minmax, numbersFormatter, - AssetHolder.ROUNDING + AssetHolder.ROUNDING, ).orEmpty(), minmaxValueFiat = minmaxToken?.printFiat(details.minmax, numbersFormatter) .orEmpty(), route = details.swapRoute?.joinToString("->").orEmpty(), + lpFeeTitle = title, + lpFeeHint = desc, ) ) } diff --git a/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/states/SwapMainState.kt b/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/states/SwapMainState.kt index 5c6ccd2ef..706d9ae01 100644 --- a/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/states/SwapMainState.kt +++ b/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/states/SwapMainState.kt @@ -66,6 +66,8 @@ data class SwapDetailsState( val priceToFromTitle: String, val priceToFrom: String, val lpFee: String, + @StringRes val lpFeeTitle: Int, + @StringRes val lpFeeHint: Int, val route: String, val shouldTransactionReminderInsufficientWarningBeShown: Boolean, ) @@ -83,6 +85,8 @@ fun defaultSwapDetailsState() = priceToFromTitle = "", priceToFrom = "", lpFee = "", + lpFeeTitle = R.string.polkaswap_liqudity_fee, + lpFeeHint = R.string.polkaswap_liqudity_fee_info, route = "", shouldTransactionReminderInsufficientWarningBeShown = false, ) diff --git a/feature_polkaswap_impl/src/test/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/polkaswap/SwapViewModelTest.kt b/feature_polkaswap_impl/src/test/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/polkaswap/SwapViewModelTest.kt index 224822860..f9f587b56 100644 --- a/feature_polkaswap_impl/src/test/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/polkaswap/SwapViewModelTest.kt +++ b/feature_polkaswap_impl/src/test/java/jp/co/soramitsu/feature_polkaswap_impl/presentation/polkaswap/SwapViewModelTest.kt @@ -52,6 +52,7 @@ import jp.co.soramitsu.feature_assets_api.presentation.launcher.AssetsRouter import jp.co.soramitsu.feature_main_api.launcher.MainRouter import jp.co.soramitsu.feature_polkaswap_api.domain.interfaces.SwapInteractor import jp.co.soramitsu.feature_polkaswap_api.domain.model.SwapDetails +import jp.co.soramitsu.feature_polkaswap_api.domain.model.SwapFeeMode import jp.co.soramitsu.feature_polkaswap_impl.presentation.screens.swap.SwapViewModel import jp.co.soramitsu.feature_wallet_api.domain.interfaces.WalletInteractor import jp.co.soramitsu.test_data.PolkaswapTestData @@ -300,6 +301,7 @@ class SwapViewModelTest { networkFee, PoolDex(0, assetsListItems.first().tokenId, assetsListItems.last().tokenId), null, + SwapFeeMode.NON_SYNTHETIC, ) ) advanceUntilIdle()