-
Notifications
You must be signed in to change notification settings - Fork 3
/
App.vue
30 lines (24 loc) · 939 Bytes
/
App.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<template>
<SuiWalletProvider v-model:all-browser-wallets="allWallets" v-model:wallet="wallet">
<ul>
<li v-for="browserWallet in allWallets" :key="browserWallet.name">
<img :src="browserWallet.icon" height="32" alt="wallet logo">
<span>{{ browserWallet.name }}</span>
<button @click="wallet?.connect(browserWallet)">Connect</button>
</li>
</ul>
<ul>
<li v-for="account in wallet?.accounts" :key="account.address">{{account.address}}</li>
</ul>
</SuiWalletProvider>
</template>
<script setup lang="ts">
import {onMounted, ref} from "vue";
import {SuiWalletProvider} from "vue-sui-dapp-kit";
import type {BrowserWalletType, WalletStoreType} from "vue-sui-dapp-kit";
const allWallets = ref<BrowserWalletType[]>()
const wallet = ref<WalletStoreType>()
onMounted(async () => {
console.log(wallet)
})
</script>