mirror of
https://github.com/tornadocash/provider.git
synced 2024-11-21 17:26:51 +01:00
feat: connect example
This commit is contained in:
parent
92032962fc
commit
d1aeff786f
@ -11,7 +11,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxtjs/provider": "https://github.com/tornadocash/provider.git",
|
"@nuxtjs/provider": "https://github.com/tornadocash/provider.git",
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.6.5",
|
||||||
"nuxt": "^2.14.6"
|
"nuxt": "^2.14.6",
|
||||||
|
"vuex": "^3.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {}
|
"devDependencies": {}
|
||||||
}
|
}
|
||||||
|
@ -3,14 +3,30 @@
|
|||||||
<div>
|
<div>
|
||||||
<Logo />
|
<Logo />
|
||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
Example
|
address: {{ getAddress }}
|
||||||
|
<br>
|
||||||
|
network: {{ getNetwork }}
|
||||||
</h1>
|
</h1>
|
||||||
|
<button @click="handleConnectProvider">Connect</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {}
|
import { mapActions, mapGetters } from 'vuex'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
computed: {
|
||||||
|
...mapGetters('provider', ['getAddress', 'getNetwork']),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
...mapActions('provider', ['initProvider']),
|
||||||
|
handleConnectProvider() {
|
||||||
|
this.initProvider({ name: 'metamask', network: 'mainnet' })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@ -36,7 +52,7 @@ export default {}
|
|||||||
sans-serif;
|
sans-serif;
|
||||||
display: block;
|
display: block;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-size: 100px;
|
font-size: 32px;
|
||||||
color: #35495e;
|
color: #35495e;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user