Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added warning for maya synths #316

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# 1.22.1 (2024-08-)
# 1.22.1 (2024-08-15)

## Updates/Fixes
- Bond tools update [#309](https://github.com/asgardex/asgardex-desktop/pull/315)
- Mayachain synth warning [#311](https://github.com/asgardex/asgardex-desktop/pull/315)

## Add

Expand Down
10 changes: 5 additions & 5 deletions src/renderer/components/settings/WalletSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ export const WalletSettings: React.FC<Props> = (props): JSX.Element => {
dataSource={walletAccounts}
renderItem={({ chain, accounts: { keystore, ledger: oLedger } }, i: number) => (
<Styled.ListItem key={i}>
<div className="flex w-full items-center">
<div className="flex w-full items-center justify-start">
<AssetIcon asset={getChainAsset(chain)} size="small" network={Network.Mainnet} />
<Styled.AccountTitle>{chain}</Styled.AccountTitle>
</div>
Expand All @@ -744,8 +744,8 @@ export const WalletSettings: React.FC<Props> = (props): JSX.Element => {
<SwitchButton active={enabledChains.includes(chain)} onChange={() => toggleChain(chain)} />
<span className="ml-2 text-text0 dark:text-text0d">
{enabledChains.includes(chain)
? intl.formatMessage({ id: 'common.disable' })
: intl.formatMessage({ id: 'common.enable' })}
? intl.formatMessage({ id: 'common.disable' }, { chain: chain })
: intl.formatMessage({ id: 'common.enable' }, { chain: chain })}
</span>
</div>
{(chain === ETHChain || chain === AVAXChain || chain === BSCChain || chain === ARBChain) && (
Expand Down Expand Up @@ -777,8 +777,8 @@ export const WalletSettings: React.FC<Props> = (props): JSX.Element => {
className="ml-10px"
tooltip={
isAddingByChain[chain]
? intl.formatMessage({ id: 'common.addAssetManually' })
: intl.formatMessage({ id: 'common.remove' })
? intl.formatMessage({ id: 'common.addAsset' })
: intl.formatMessage({ id: 'common.removeAsset' })
}
/>
</div>
Expand Down
16 changes: 14 additions & 2 deletions src/renderer/components/swap/Swap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { AVAXChain } from '@xchainjs/xchain-avax'
import { BSCChain } from '@xchainjs/xchain-bsc'
import { Network } from '@xchainjs/xchain-client'
import { ETHChain } from '@xchainjs/xchain-ethereum'
import { AssetCacao } from '@xchainjs/xchain-mayachain'
import { AssetCacao, MAYAChain } from '@xchainjs/xchain-mayachain'
import { MayachainQuery, QuoteSwap, QuoteSwapParams as QuoteSwapParamsMaya } from '@xchainjs/xchain-mayachain-query'
import { AssetRuneNative, THORChain } from '@xchainjs/xchain-thorchain'
import { InboundDetail, QuoteSwapParams, ThorchainQuery, TxDetails } from '@xchainjs/xchain-thorchain-query'
Expand Down Expand Up @@ -1756,7 +1756,7 @@ export const Swap = ({
const resetToDefault = () => {
setStreamingInterval(dex.chain === THORChain ? 1 : 3) // Default position
setStreamingQuantity(0) // thornode | mayanode decides the swap quantity
setSlider(26)
setSlider(dex.chain === THORChain ? 26 : 76)
setIsStreaming(true)
}
const quoteOnlyButton = () => {
Expand Down Expand Up @@ -2754,6 +2754,18 @@ export const Swap = ({
) : (
<></>
)}
{dex.chain === MAYAChain && (
// Temp fix, delete when ready
<div className="text-12 text-gray2 dark:border-gray1d dark:text-gray2d">
<div className="flex pb-4">
<div className="rounded text-warning0 dark:text-warning0d">
{targetAsset.synth && (
<>{`Currently mayanode cant handle streaming to synths, please drag interval slider to position 0 for limit swap`}</>
)}
</div>
</div>
</div>
)}
</Row>
<AssetInput
className="w-full"
Expand Down
10 changes: 6 additions & 4 deletions src/renderer/i18n/de/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ const common: CommonMessages = {
'common.general': 'Allgemein',
'common.advanced': 'Erweitert',
'common.privateData': 'Private Daten',
'common.enable': 'Aktivieren',
'common.disable': 'Deaktivieren',
'common.enable': 'Aktivieren {chain}',
'common.disable': 'Deaktivieren {chain}',
'common.disabledChains': 'Deaktivierte Ketten',
'common.chainDisabled': 'Sie haben diese Kette deaktiviert, bitte aktivieren Sie sie, um mit dem Tausch fortzufahren',
'common.chainDisabled':
'Sie haben die {chain}-Kette deaktiviert, bitte aktivieren Sie sie, um mit dem Tausch fortzufahren',
'common.date': 'Datum',
'common.remove': 'Entfernen',
'common.keystore': 'Keystore',
Expand Down Expand Up @@ -96,7 +97,8 @@ const common: CommonMessages = {
'common.min': 'Min',
'common.search': 'Suche',
'common.searchAsset': 'Suche Asset',
'common.addAssetManually': 'ERC20 wird nicht angezeigt? Asset manuell hinzufügen',
'common.addAsset': 'Token wird nicht angezeigt? Manuell hinzufügen',
'common.removeAsset': 'Asset aus der Wallet-Ansicht entfernen',
'common.searchExample': 'Suchbeispiel für nicht-synth chain.ticker, z.B. btc.btc oder für synth btc/btc',
'common.excludeSynth': 'Synths ausschließen',
'common.retry': 'Wiederholen',
Expand Down
7 changes: 4 additions & 3 deletions src/renderer/i18n/en/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const common: CommonMessages = {
'common.general': 'General',
'common.advanced': 'Advanced',
'common.privateData': 'Private Data',
'common.enable': 'Enable',
'common.disable': 'Disable',
'common.enable': 'Enable {chain}',
'common.disable': 'Disable {chain}',
'common.disabledChains': 'Disabled Chains',
'common.chainDisabled': 'You have disabled {chain} chain, please enable to continue with swap',
'common.remove': 'Remove',
Expand Down Expand Up @@ -96,7 +96,8 @@ const common: CommonMessages = {
'common.min': 'Min',
'common.search': 'Search',
'common.searchAsset': 'Search Asset',
'common.addAssetManually': 'ERC20 not showing? add asset manually',
'common.addAsset': 'Token not showing? add manually',
'common.removeAsset': 'Remove asset from wallet view',
'common.searchExample': 'Search example for non synth chain.ticker i.e btc.btc or for synth btc/btc',
'common.excludeSynth': 'Exclude Synths',
'common.retry': 'Retry',
Expand Down
9 changes: 5 additions & 4 deletions src/renderer/i18n/es/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ const common: CommonMessages = {
'common.general': 'General',
'common.advanced': 'Avanzado',
'common.privateData': 'Datos privados',
'common.enable': 'Activar',
'common.disable': 'Desactivar',
'common.enable': 'Activar {chain}',
'common.disable': 'Desactivar {chain}',
'common.disabledChains': 'Cadenas desactivadas',
'common.chainDisabled': 'Ha desactivado esta cadena, por favor actívela para continuar con el intercambio',
'common.chainDisabled': 'Has desactivado la cadena {chain}, por favor actívala para continuar con el intercambio',
'common.remove': 'Eliminar',
'common.keystore': 'Keystore',
'common.keystorePassword': 'Keystore contraseña',
Expand Down Expand Up @@ -95,7 +95,8 @@ const common: CommonMessages = {
'common.min': 'Mín',
'common.search': 'Buscar en',
'common.searchAsset': 'Buscar Activo',
'common.addAssetManually': '¿No se muestra ERC20? Agrega el activo manualmente',
'common.addAsset': '¿El token no aparece? Añadir manualmente',
'common.removeAsset': 'Eliminar activo de la vista de la billetera',
'common.searchExample':
'Ejemplo de búsqueda para cadena no sintética.ticker, es decir, btc.btc o para sintético btc/btc',
'common.retry': 'Reintentar',
Expand Down
9 changes: 5 additions & 4 deletions src/renderer/i18n/fr/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ const common: CommonMessages = {
'common.general': 'Général',
'common.advanced': 'Avancé',
'common.privateData': 'Données privées',
'common.enable': 'Activer',
'common.disable': 'Désactiver',
'common.enable': 'Activer {chain}',
'common.disable': 'Désactiver {chain}',
'common.disabledChains': 'Chaînes désactivées',
'common.chainDisabled': 'Vous avez désactivé cette chaîne, veuillez lactiver pour continuer l’échange',
'common.chainDisabled': `Vous avez désactivé la chaîne {chain}, veuillez l'activer pour continuer l'échange`,
'common.remove': 'Supprimer',
'common.keystore': 'Keystore',
'common.keystorePassword': 'Keystore mot de passe',
Expand Down Expand Up @@ -95,7 +95,8 @@ const common: CommonMessages = {
'common.min': 'Minimum',
'common.search': 'Rechercher',
'common.searchAsset': 'Rechercher un actif',
'common.addAssetManually': 'ERC20 ne s’affiche pas ? Ajoutez l’actif manuellement',
'common.addAsset': `Le jeton ne s'affiche pas ? Ajouter manuellement`,
'common.removeAsset': "Supprimer l'actif de la vue du portefeuille",
'common.searchExample': 'Exemple de recherche pour chaîne non synthétique.ticker ex. btc.btc ou pour synth btc/btc',
'common.excludeSynth': 'Exclure les Synth',
'common.retry': 'Réessayer',
Expand Down
9 changes: 5 additions & 4 deletions src/renderer/i18n/hi/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ const common: CommonMessages = {
'common.general': 'सामान्य',
'common.advanced': 'उन्नत',
'common.privateData': 'निजी डेटा',
'common.enable': 'सक्षम करें',
'common.disable': 'अक्षम करें',
'common.enable': 'सक्षम करें {chain}',
'common.disable': 'अक्षम करें {chain}',
'common.disabledChains': 'अक्षम चेन',
'common.chainDisabled': 'आपने इस श्रृंखला को अक्षम कर दिया है, कृपया स्वैप जारी रखने के लिए इसे सक्षम करें',
'common.chainDisabled': 'आपने {chain} श्रृंखला को अक्षम कर दिया है, कृपया स्वैप जारी रखने के लिए इसे सक्षम करें',
'common.remove': 'हटाएँ',
'common.keystore': 'कीस्टोर',
'common.keystorePassword': 'कीस्टोर पासवर्ड',
Expand Down Expand Up @@ -96,7 +96,8 @@ const common: CommonMessages = {
'common.min': 'न्यूनतम',
'common.search': 'खोज',
'common.searchAsset': 'एसेट खोजें',
'common.addAssetManually': 'ERC20 नहीं दिख रहा है? संपत्ति को मैन्युअल रूप से जोड़ें',
'common.addAsset': 'टोकन नहीं दिख रहा? मैन्युअल रूप से जोड़ें',
'common.removeAsset': 'वॉलेट दृश्य से संपत्ति हटाएं',
'common.searchExample': 'गैर सिंथ चेन.टिकर के लिए खोज उदाहरण जैसे कि btc.btc या सिंथ के लिए btc/btc',
'common.excludeSynth': 'सिंथ्स को बाहर करें',
'common.retry': 'पुनः प्रयास करें',
Expand Down
9 changes: 5 additions & 4 deletions src/renderer/i18n/ru/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ const common: CommonMessages = {
'common.general': 'Основной',
'common.advanced': 'Продвинутый',
'common.privateData': 'Личные данные',
'common.enable': 'Включить',
'common.disable': 'Отключить',
'common.enable': 'Включить {chain}',
'common.disable': 'Отключить {chain}',
'common.disabledChains': 'Отключенные цепи',
'common.chainDisabled': 'Вы отключили эту цепочку, пожалуйста, включите ее, чтобы продолжить обмен',
'common.chainDisabled': 'Вы отключили цепочку {chain}, пожалуйста, включите её, чтобы продолжить обмен',
'common.remove': 'Удалить',
'common.keystore': 'Keystore',
'common.keystorePassword': 'Пароль Keystore',
Expand Down Expand Up @@ -96,7 +96,8 @@ const common: CommonMessages = {
'common.min': 'Мин.',
'common.search': 'Поиск',
'common.searchAsset': 'Поиск актива',
'common.addAssetManually': 'ERC20 не отображается? Добавьте актив вручную',
'common.addAsset': 'Токен не отображается? Добавить вручную',
'common.removeAsset': 'Удалить актив из вида кошелька',
'common.searchExample': 'Пример поиска для не синтетической цепи.ticker, например, btc.btc или для синтетики btc/btc',
'common.excludeSynth': 'Исключить синтезы',
'common.retry': 'Повторить',
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/i18n/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ export type CommonMessageKey =
| 'common.min'
| 'common.search'
| 'common.searchAsset'
| 'common.addAssetManually'
| 'common.addAsset'
| 'common.removeAsset'
| 'common.searchExample'
| 'common.excludeSynth'
| 'common.retry'
Expand Down