From fdbfed9e4a738eae07bdeca55e84e5cae28e9fd1 Mon Sep 17 00:00:00 2001 From: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Date: Thu, 26 Jan 2023 18:24:08 +0100 Subject: [PATCH 1/4] Use settingsStorage from wallet --- src/utils/storage.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utils/storage.ts b/src/utils/storage.ts index 8f2c846ec..fc0a65b09 100644 --- a/src/utils/storage.ts +++ b/src/utils/storage.ts @@ -1,6 +1,4 @@ -import { Storage } from '@sora-substrate/util'; import { storage as soraStorage } from '@soramitsu/soraneo-wallet-web'; -export const settingsStorage = new Storage('dexSettings'); - +export { settingsStorage } from '@soramitsu/soraneo-wallet-web'; export default soraStorage; From acd6331cee9dae007e51ed989b45d594b24ad216 Mon Sep 17 00:00:00 2001 From: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Date: Fri, 27 Jan 2023 13:30:51 +0100 Subject: [PATCH 2/4] Update wallet version --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b1765dfbd..5389aeee7 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "dependencies": { "@metamask/detect-provider": "^2.0.0", - "@soramitsu/soraneo-wallet-web": "1.13.7", + "@soramitsu/soraneo-wallet-web": "1.13.9", "@walletconnect/web3-provider": "^1.8.0", "base-64": "^1.0.0", "core-js": "^3.26.0", diff --git a/yarn.lock b/yarn.lock index 3aec083c5..1b6d7806f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2597,10 +2597,10 @@ vue-property-decorator "^9.1.2" vuex "^3.6.2" -"@soramitsu/soraneo-wallet-web@1.13.7": - version "1.13.7" - resolved "https://nexus.iroha.tech/repository/npm-group/@soramitsu/soraneo-wallet-web/-/soraneo-wallet-web-1.13.7.tgz#dfdb2d216804ede4d1df024b3cb5c585bc752fb3" - integrity sha512-9+toLZE8TQxrt8McJys18maGLJFiXeGX1IkvdC7Z8eBPCrvcUZFdXPixZOHWOkz3ucnsHfK7nK68R9PBlT30qQ== +"@soramitsu/soraneo-wallet-web@1.13.9": + version "1.13.9" + resolved "https://nexus.iroha.tech/repository/npm-group/@soramitsu/soraneo-wallet-web/-/soraneo-wallet-web-1.13.9.tgz#45aa647ad9be3be6394d74efb2d9310d97dacbea" + integrity sha512-m0txbc9ZktGiTmEALO08jsc3BqzDqlofvy0tuU1v52jcNCsip4HF5lvNd3yyWz5qoZudV43q2m/bPplQ0LiOLg== dependencies: "@polkadot/vue-identicon" "2.9.14" "@sora-substrate/util" "1.13.12" From b85ec91ceb64b1d51f316aae4c5b64dc5f7999b3 Mon Sep 17 00:00:00 2001 From: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Date: Fri, 27 Jan 2023 13:31:48 +0100 Subject: [PATCH 3/4] Hide switch on Explore page for !isLoggedIn --- src/views/Explore/Container.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/Explore/Container.vue b/src/views/Explore/Container.vue index ac9de52f8..bd0b6e7dc 100644 --- a/src/views/Explore/Container.vue +++ b/src/views/Explore/Container.vue @@ -43,6 +43,7 @@ import TranslationMixin from '@/components/mixins/TranslationMixin'; import storage from '@/utils/storage'; import router, { lazyComponent } from '@/router'; import { PageNames, Components } from '@/consts'; +import { getter } from '@/store/decorators'; const storageKey = 'exploreAccountItems'; @@ -53,6 +54,8 @@ const storageKey = 'exploreAccountItems'; }, }) export default class ExploreContainer extends Mixins(mixins.LoadingMixin, TranslationMixin) { + @getter.wallet.account.isLoggedIn private isLoggedIn!: boolean; + exploreQuery = ''; isAccountItems = Boolean(storage.get(storageKey as any)); @@ -82,8 +85,9 @@ export default class ExploreContainer extends Mixins(mixins.LoadingMixin, Transl return this.t(`pageTitle.${this.pageName}`); } + /** Shown only for logged in users and for any tab on page except Tokens */ get switcherAvailable(): boolean { - return this.pageName !== PageNames.ExploreTokens; + return this.pageName !== PageNames.ExploreTokens && this.isLoggedIn; } handleTabChange(name: string): void { From c0fcb6f75a8b03c864d053e0952ab3ec8748632b Mon Sep 17 00:00:00 2001 From: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> Date: Fri, 27 Jan 2023 13:48:41 +0100 Subject: [PATCH 4/4] Update lokalise --- src/lang/cs.json | 4 +++- src/lang/de.json | 4 +++- src/lang/en.json | 4 +++- src/lang/es.json | 4 +++- src/lang/fr.json | 4 +++- src/lang/hr.json | 4 +++- src/lang/hu.json | 4 +++- src/lang/hy.json | 4 +++- src/lang/id.json | 4 +++- src/lang/it.json | 4 +++- src/lang/nl.json | 4 +++- src/lang/no.json | 4 +++- src/lang/pl.json | 4 +++- src/lang/ru.json | 4 +++- src/lang/sk.json | 4 +++- src/lang/sr.json | 4 +++- src/lang/sv.json | 4 +++- src/lang/vi.json | 4 +++- src/lang/yo.json | 4 +++- src/lang/zh_CN.json | 4 +++- 20 files changed, 60 insertions(+), 20 deletions(-) diff --git a/src/lang/cs.json b/src/lang/cs.json index b7e501e54..930a6a22f 100644 --- a/src/lang/cs.json +++ b/src/lang/cs.json @@ -102,7 +102,9 @@ }, "selectWallet": "Vyberte peněženku, se kterou chcete pracovat", "wallet": { - "install": "Nainstalujte" + "install": "Nainstalujte", + "connected": "Připojeno", + "notConnected": "Nepřipojený" } }, "wallet": { diff --git a/src/lang/de.json b/src/lang/de.json index 1d9d721a9..2a2b163ee 100644 --- a/src/lang/de.json +++ b/src/lang/de.json @@ -102,7 +102,9 @@ }, "selectWallet": "Wähle eine Wallet zum Arbeiten aus", "wallet": { - "install": "Installieren" + "install": "Installieren", + "connected": "In Verbindung gebracht", + "notConnected": "Nicht verbunden" } }, "wallet": { diff --git a/src/lang/en.json b/src/lang/en.json index 0ab82ed19..2c595cdc6 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -102,7 +102,9 @@ }, "selectWallet": "Select a wallet to work with", "wallet": { - "install": "Install" + "install": "Install", + "connected": "Connected", + "notConnected": "Not connected" } }, "wallet": { diff --git a/src/lang/es.json b/src/lang/es.json index 9ef51f47e..9e7fd445f 100644 --- a/src/lang/es.json +++ b/src/lang/es.json @@ -102,7 +102,9 @@ }, "selectWallet": "Seleccione una billetera con la que trabajar", "wallet": { - "install": "Instalar" + "install": "Instalar", + "connected": "Conectado", + "notConnected": "No conectado" } }, "wallet": { diff --git a/src/lang/fr.json b/src/lang/fr.json index e43e613a3..04dd6a5bc 100644 --- a/src/lang/fr.json +++ b/src/lang/fr.json @@ -102,7 +102,9 @@ }, "selectWallet": "Sélectionnez un portefeuille avec lequel travailler", "wallet": { - "install": "Installer" + "install": "Installer", + "connected": "Connecté", + "notConnected": "Pas connecté" } }, "wallet": { diff --git a/src/lang/hr.json b/src/lang/hr.json index 32cafc29b..4850787e4 100644 --- a/src/lang/hr.json +++ b/src/lang/hr.json @@ -102,7 +102,9 @@ }, "selectWallet": "Odaberite novčanik s kojim ćete raditi", "wallet": { - "install": "Instalirati" + "install": "Instalirati", + "connected": "Povezan", + "notConnected": "Nije povezano" } }, "wallet": { diff --git a/src/lang/hu.json b/src/lang/hu.json index 63056e0c9..256b82034 100644 --- a/src/lang/hu.json +++ b/src/lang/hu.json @@ -102,7 +102,9 @@ }, "selectWallet": "Válasszon egy pénztárcát, amellyel dolgozni szeretne", "wallet": { - "install": "Telepítés" + "install": "Telepítés", + "connected": "csatlakoztatva", + "notConnected": "Nem kapcsolódik" } }, "wallet": { diff --git a/src/lang/hy.json b/src/lang/hy.json index e3a34bf99..a46f4190d 100644 --- a/src/lang/hy.json +++ b/src/lang/hy.json @@ -102,7 +102,9 @@ }, "selectWallet": "Ընտրեք դրամապանակ՝ աշխատելու համար", "wallet": { - "install": "Տեղադրեք" + "install": "Տեղադրեք", + "connected": "Միացված է", + "notConnected": "Միացված չէ" } }, "wallet": { diff --git a/src/lang/id.json b/src/lang/id.json index 3443be969..ed37348da 100644 --- a/src/lang/id.json +++ b/src/lang/id.json @@ -102,7 +102,9 @@ }, "selectWallet": "Pilih dompet untuk digunakan", "wallet": { - "install": "Install" + "install": "Install", + "connected": "Terhubung", + "notConnected": "Tidak terhubung" } }, "wallet": { diff --git a/src/lang/it.json b/src/lang/it.json index 7aeee11fa..1690535b4 100644 --- a/src/lang/it.json +++ b/src/lang/it.json @@ -102,7 +102,9 @@ }, "selectWallet": "Seleziona un portafoglio con cui lavorare", "wallet": { - "install": "Installare" + "install": "Installare", + "connected": "Collegato", + "notConnected": "Non connesso" } }, "wallet": { diff --git a/src/lang/nl.json b/src/lang/nl.json index e2dfb220a..03f808e13 100644 --- a/src/lang/nl.json +++ b/src/lang/nl.json @@ -102,7 +102,9 @@ }, "selectWallet": "Selecteer een portemonnee om mee te werken", "wallet": { - "install": "Installeren" + "install": "Installeren", + "connected": "Verbonden", + "notConnected": "Niet verbonden" } }, "wallet": { diff --git a/src/lang/no.json b/src/lang/no.json index 25c4e8f5f..91bf7fa95 100644 --- a/src/lang/no.json +++ b/src/lang/no.json @@ -102,7 +102,9 @@ }, "selectWallet": "Velg en lommebok du vil jobbe med", "wallet": { - "install": "Installere" + "install": "Installere", + "connected": "Tilkoblet", + "notConnected": "Ikke tilkoblet" } }, "wallet": { diff --git a/src/lang/pl.json b/src/lang/pl.json index ff9fd0a65..177a8af1b 100644 --- a/src/lang/pl.json +++ b/src/lang/pl.json @@ -102,7 +102,9 @@ }, "selectWallet": "Wybierz portfel do pracy", "wallet": { - "install": "zainstalować" + "install": "zainstalować", + "connected": "Połączony", + "notConnected": "Nie połączony" } }, "wallet": { diff --git a/src/lang/ru.json b/src/lang/ru.json index 63f1f3934..566eceb03 100644 --- a/src/lang/ru.json +++ b/src/lang/ru.json @@ -102,7 +102,9 @@ }, "selectWallet": "Выберите кошелек для работы", "wallet": { - "install": "Установить" + "install": "Установить", + "connected": "Подключено", + "notConnected": "Не подключен" } }, "wallet": { diff --git a/src/lang/sk.json b/src/lang/sk.json index 77d5d3533..a468f3ec2 100644 --- a/src/lang/sk.json +++ b/src/lang/sk.json @@ -102,7 +102,9 @@ }, "selectWallet": "Vyberte peňaženku, s ktorou chcete pracovať", "wallet": { - "install": "Inštalácia" + "install": "Inštalácia", + "connected": "Pripojené", + "notConnected": "Nepripojený" } }, "wallet": { diff --git a/src/lang/sr.json b/src/lang/sr.json index bf958dd5d..37917f7d0 100644 --- a/src/lang/sr.json +++ b/src/lang/sr.json @@ -102,7 +102,9 @@ }, "selectWallet": "Изаберите новчаник са којим ћете радити", "wallet": { - "install": "Инсталирај" + "install": "Инсталирај", + "connected": "Повезан", + "notConnected": "Није повезан" } }, "wallet": { diff --git a/src/lang/sv.json b/src/lang/sv.json index c38e7cad1..f83dc0179 100644 --- a/src/lang/sv.json +++ b/src/lang/sv.json @@ -102,7 +102,9 @@ }, "selectWallet": "Välj en plånbok att arbeta med", "wallet": { - "install": "Installera" + "install": "Installera", + "connected": "Ansluten", + "notConnected": "Ej ansluten" } }, "wallet": { diff --git a/src/lang/vi.json b/src/lang/vi.json index 334012adb..02bcf01f5 100644 --- a/src/lang/vi.json +++ b/src/lang/vi.json @@ -102,7 +102,9 @@ }, "selectWallet": "Chọn một ví để kết nối", "wallet": { - "install": "Cài đặt" + "install": "Cài đặt", + "connected": "kết nối", + "notConnected": "Không kết nối" } }, "wallet": { diff --git a/src/lang/yo.json b/src/lang/yo.json index 8fae78bf7..7f391ba88 100644 --- a/src/lang/yo.json +++ b/src/lang/yo.json @@ -102,7 +102,9 @@ }, "selectWallet": "Yan apamọwọ kan lati ṣiṣẹ pẹlu", "wallet": { - "install": "Fi sori ẹrọ" + "install": "Fi sori ẹrọ", + "connected": "Ti sopọ", + "notConnected": "Ko ti sopọ" } }, "wallet": { diff --git a/src/lang/zh_CN.json b/src/lang/zh_CN.json index b2dd1c80e..d8ff6b55a 100644 --- a/src/lang/zh_CN.json +++ b/src/lang/zh_CN.json @@ -102,7 +102,9 @@ }, "selectWallet": "选择要使用的钱包", "wallet": { - "install": "安装" + "install": "安装", + "connected": "连接的", + "notConnected": "未连接" } }, "wallet": {