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

Use settingsStorage from wallet #929

Merged
merged 4 commits into from
Jan 27, 2023
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion src/lang/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Vyberte peněženku, se kterou chcete pracovat",
"wallet": {
"install": "Nainstalujte"
"install": "Nainstalujte",
"connected": "Připojeno",
"notConnected": "Nepřipojený"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Select a wallet to work with",
"wallet": {
"install": "Install"
"install": "Install",
"connected": "Connected",
"notConnected": "Not connected"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Seleccione una billetera con la que trabajar",
"wallet": {
"install": "Instalar"
"install": "Instalar",
"connected": "Conectado",
"notConnected": "No conectado"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Sélectionnez un portefeuille avec lequel travailler",
"wallet": {
"install": "Installer"
"install": "Installer",
"connected": "Connecté",
"notConnected": "Pas connecté"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Odaberite novčanik s kojim ćete raditi",
"wallet": {
"install": "Instalirati"
"install": "Instalirati",
"connected": "Povezan",
"notConnected": "Nije povezano"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/hy.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Ընտրեք դրամապանակ՝ աշխատելու համար",
"wallet": {
"install": "Տեղադրեք"
"install": "Տեղադրեք",
"connected": "Միացված է",
"notConnected": "Միացված չէ"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Pilih dompet untuk digunakan",
"wallet": {
"install": "Install"
"install": "Install",
"connected": "Terhubung",
"notConnected": "Tidak terhubung"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Seleziona un portafoglio con cui lavorare",
"wallet": {
"install": "Installare"
"install": "Installare",
"connected": "Collegato",
"notConnected": "Non connesso"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Selecteer een portemonnee om mee te werken",
"wallet": {
"install": "Installeren"
"install": "Installeren",
"connected": "Verbonden",
"notConnected": "Niet verbonden"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Velg en lommebok du vil jobbe med",
"wallet": {
"install": "Installere"
"install": "Installere",
"connected": "Tilkoblet",
"notConnected": "Ikke tilkoblet"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Wybierz portfel do pracy",
"wallet": {
"install": "zainstalować"
"install": "zainstalować",
"connected": "Połączony",
"notConnected": "Nie połączony"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Выберите кошелек для работы",
"wallet": {
"install": "Установить"
"install": "Установить",
"connected": "Подключено",
"notConnected": "Не подключен"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/sk.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/sr.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Изаберите новчаник са којим ћете радити",
"wallet": {
"install": "Инсталирај"
"install": "Инсталирај",
"connected": "Повезан",
"notConnected": "Није повезан"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "Välj en plånbok att arbeta med",
"wallet": {
"install": "Installera"
"install": "Installera",
"connected": "Ansluten",
"notConnected": "Ej ansluten"
}
},
"wallet": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/yo.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 3 additions & 1 deletion src/lang/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
},
"selectWallet": "选择要使用的钱包",
"wallet": {
"install": "安装"
"install": "安装",
"connected": "连接的",
"notConnected": "未连接"
}
},
"wallet": {
Expand Down
4 changes: 1 addition & 3 deletions src/utils/storage.ts
Original file line number Diff line number Diff line change
@@ -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;
6 changes: 5 additions & 1 deletion src/views/Explore/Container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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));

Expand Down Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down