Skip to content

Commit

Permalink
fix(app): eip-6963 page
Browse files Browse the repository at this point in the history
  • Loading branch information
johnson86tw committed Apr 30, 2024
1 parent c3929aa commit b86c833
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/components/content/Eip6963.client.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { useVueDapp, shortenAddress, RdnsEnum, type ConnectorName, type RDNS } from '@vue-dapp/core'
import { useVueDapp, shortenAddress, RdnsEnum, type RDNS } from '@vue-dapp/core'
import { useVueDappModal } from '@vue-dapp/modal'
const { providerDetails, wallet, address, status, connectTo, disconnect, error, isConnected } = useVueDapp()
Expand All @@ -14,9 +14,9 @@ const providerList = computed(() => {
})
})
async function onClickWallet(connName: ConnectorName, rdns?: RDNS) {
async function onClickWallet(rdns?: RDNS) {
useVueDappModal().close()
await connectTo(connName, { rdns })
await connectTo('BrowserWallet', { target: 'rdns', rdns })
}
</script>

Expand All @@ -26,7 +26,7 @@ async function onClickWallet(connName: ConnectorName, rdns?: RDNS) {
<n-button
v-for="detail in providerList"
:key="detail.info.uuid"
@click="onClickWallet('BrowserWallet', detail.info.rdns)"
@click="onClickWallet(detail.info.rdns)"
size="medium"
:disabled="status === 'connecting' || wallet.providerInfo?.rdns === detail.info.rdns"
>
Expand Down
8 changes: 4 additions & 4 deletions app/content/eip-6963.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Using window events to announce [EIP-1193](https://eips.ethereum.org/EIPS/eip-11
::code-group

```ts [setup script]
import { useVueDapp, shortenAddress, RdnsEnum, type ConnectorName, type RDNS } from '@vue-dapp/core'
import { useVueDapp, shortenAddress, RdnsEnum, type RDNS } from '@vue-dapp/core'
import { useVueDappModal } from '@vue-dapp/modal'

const { providerDetails, wallet, address, status, connectTo, disconnect, error, isConnected } = useVueDapp()
Expand All @@ -43,9 +43,9 @@ const providerList = computed(() => {
})
})

async function onClickWallet(connName: ConnectorName, rdns?: RDNS) {
async function onClickWallet(rdns?: RDNS) {
useVueDappModal().close()
await connectTo(connName, { rdns })
await connectTo('BrowserWallet', { target: 'rdns', rdns })
}
```

Expand All @@ -56,7 +56,7 @@ async function onClickWallet(connName: ConnectorName, rdns?: RDNS) {
<n-button
v-for="detail in providerList"
:key="detail.info.uuid"
@click="onClickWallet('BrowserWallet', detail.info.rdns)"
@click="onClickWallet(detail.info.rdns)"
size="medium"
:disabled="status === 'connecting' || wallet.providerInfo?.rdns === detail.info.rdns"
>
Expand Down

0 comments on commit b86c833

Please sign in to comment.