feat: add WalletConnect reconnect dialog
This commit is contained in:
parent
d7eed4262e
commit
95ef203ed4
6 changed files with 41 additions and 16 deletions
|
@ -21,6 +21,8 @@
|
|||
</template>
|
||||
<script>
|
||||
import { mapState, mapActions, mapGetters } from 'vuex'
|
||||
|
||||
import { sleep } from '@/utils'
|
||||
import config from '@/networkConfig'
|
||||
|
||||
export default {
|
||||
|
@ -48,7 +50,7 @@ export default {
|
|||
async setNetwork(netId) {
|
||||
this.enable({ message: this.$t('changingNetwork') })
|
||||
|
||||
await this.sleep()
|
||||
await sleep(800)
|
||||
|
||||
try {
|
||||
const providerName = window.localStorage.getItem('provider')
|
||||
|
@ -68,13 +70,6 @@ export default {
|
|||
this.disable()
|
||||
}
|
||||
},
|
||||
sleep() {
|
||||
return new Promise((resolve) =>
|
||||
setTimeout(() => {
|
||||
resolve()
|
||||
}, 800)
|
||||
)
|
||||
},
|
||||
checkSupportNetwork(netId) {
|
||||
const isSupport = Object.keys(this.networkConfig).includes(`netId${netId}`)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue