Skip to content

Commit

Permalink
fix: disable Keystone wallet (#278)
Browse files Browse the repository at this point in the history
* fix: disable Keystone wallet

* fix: remove unneeded styles for onboard error modal
  • Loading branch information
JackHamer09 authored May 31, 2022
1 parent 497740c commit 0b52e42
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 6 deletions.
4 changes: 4 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ const config = {
* Added for all environments to reduce complexity
**/ APP_ID: "764666de-bcb7-48a6-91fc-75e9dc086ea0",
},
disabledWallets: [{
name: "Keystone",
error: `Wallet Keystone is not supported`
}],
restoreNetwork: true,
logoutRedirect: "/",
} as ModuleOptions,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@inkline/nuxt": "^2.3.6",
"@matterlabs/eslint-config-nuxt": "^1.0.6",
"@matterlabs/prettier-config": "^1.0.2",
"@matterlabs/zksync-nuxt-core": "1.7.8",
"@matterlabs/zksync-nuxt-core": "1.8.0",
"@nuxt/typescript-runtime": "^2.1.0",
"@nuxtjs/google-gtag": "^1.0.4",
"@nuxtjs/sentry": "^5.1.7",
Expand Down
33 changes: 33 additions & 0 deletions src/blocks/modals/OnboardError.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<template>
<i-modal v-model="opened" class="wrongNetworkModal" size="md">
<template #header>Login error</template>
<div>
<div class="_padding-bottom-1 errorText">
{{ error }}
</div>
</div>
</i-modal>
</template>

<script lang="ts">
import Vue from "vue";
export default Vue.extend({
name: "WrongNetwork",
computed: {
error(): string {
return this.$store.getters["zk-onboard/error"];
},
opened: {
set(val): void {
if (val === false) {
this.$store.commit("zk-onboard/setError", "");
}
},
get(): boolean {
return !!this.error;
},
},
},
});
</script>
1 change: 1 addition & 0 deletions src/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<block-logging-in-loader />
<block-modals-wrong-network />
<block-modals-requesting-provider-error />
<block-modals-onboard-error />
<transition name="fade">
<div v-if="!loggingIn && loggedIn">
<block-header ref="header" />
Expand Down
1 change: 1 addition & 0 deletions src/layouts/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<block-index-header />
<block-modals-wrong-network />
<block-modals-requesting-provider-error />
<block-modals-onboard-error />
<i-layout-content class="routerContainer">
<transition name="fade" mode="out-in">
<nuxt />
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2952,9 +2952,9 @@ __metadata:
languageName: node
linkType: hard

"@matterlabs/zksync-nuxt-core@npm:1.7.8":
version: 1.7.8
resolution: "@matterlabs/zksync-nuxt-core@npm:1.7.8"
"@matterlabs/zksync-nuxt-core@npm:1.8.0":
version: 1.8.0
resolution: "@matterlabs/zksync-nuxt-core@npm:1.8.0"
dependencies:
"@nuxtjs/axios": ^5.13.1
"@walletconnect/client": ^1.7.1
Expand All @@ -2971,7 +2971,7 @@ __metadata:
ts-node: ^9.1.1
web3: ^1.5.3
zksync: 0.12.0-alpha.6
checksum: b5ef599e699dd4c9afccc9f2eef537799f0e6172c628864677f44b4da8c460dc8138b965dad664f5c53dfcf8afaa800f5be0fb7275c50185dc9c0505c1b4ba9e
checksum: a67e16958ef951291deea86c2a7546f4d984f94049d6cdab73e12d7752cd2cce954c12047af5e9f58ba16a9b8fbcab09079504bb6c19900fb05797cff89ef549
languageName: node
linkType: hard

Expand All @@ -2987,7 +2987,7 @@ __metadata:
"@inkline/nuxt": ^2.3.6
"@matterlabs/eslint-config-nuxt": ^1.0.6
"@matterlabs/prettier-config": ^1.0.2
"@matterlabs/zksync-nuxt-core": 1.7.8
"@matterlabs/zksync-nuxt-core": 1.8.0
"@nuxt/types": ^2.15.8
"@nuxt/typescript-build": ^2.1.0
"@nuxt/typescript-runtime": ^2.1.0
Expand Down

0 comments on commit 0b52e42

Please sign in to comment.