Skip to content

Commit

Permalink
fix(app): Multicall & EIP-6963 pages
Browse files Browse the repository at this point in the history
  • Loading branch information
johnson86tw committed Apr 30, 2024
1 parent 0641e65 commit ca26151
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
18 changes: 17 additions & 1 deletion app/components/content/Multicall.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,23 @@ const tokenList = computed(() => {
const balances = ref<{ mainnet: number[]; arbitrum: number[] }>({ mainnet: [], arbitrum: [] })
const { onWalletUpdated, onDisconnected } = useVueDapp()
const { isConnected, wallet, onWalletUpdated, onDisconnected } = useVueDapp()
onMounted(async () => {
if (isConnected.value) {
const mainnetBalance = await Promise.all([
mainnetDai.balanceOf(wallet.address),
mainnetUsdc.balanceOf(wallet.address),
mainnetAusdc.balanceOf(wallet.address),
])
const arbitrumBalance = await Promise.all([
arbitrumDai.balanceOf(wallet.address),
arbitrumUsdc.balanceOf(wallet.address),
arbitrumAusdc.balanceOf(wallet.address),
])
balances.value = { mainnet: mainnetBalance, arbitrum: arbitrumBalance }
}
})
onWalletUpdated(async (wallet: ConnWallet) => {
const mainnetBalance = await Promise.all([
Expand Down
2 changes: 1 addition & 1 deletion app/content/eip-6963.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const providerList = computed(() => {
})
})

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

0 comments on commit ca26151

Please sign in to comment.