implement first page header with metamask connection

Co-authored-by: geovanne97 <geovannessaraiva97@gmail.com>
Co-authored-by: brunoedcf <brest.dallacosta@outlook.com>
This commit is contained in:
RcleydsonR
2022-11-14 16:34:12 -03:00
parent 4ce650f0d2
commit a2acb72a1b
6 changed files with 57 additions and 52 deletions

View File

@@ -1,17 +1,21 @@
<script setup lang="ts">
import ethers from '../ethers'
import ethers from "../ethers";
const connectMetaMask = () => {
ethers.getProvider().then((web3Provider) => {
console.log(web3Provider);
})
}
});
};
</script>
<template>
<div class="about">
<button class="rounded-lg w-full border border-emerald-900 text-white py-2 bg-emerald-600 hover:bg-emerald-500 mt-4" @click="connectMetaMask()">Conectar metaMask</button>
<button
class="rounded-lg w-full border border-emerald-900 text-white py-2 bg-emerald-600 hover:bg-emerald-500 mt-4"
@click="connectMetaMask()"
>
Conectar metaMask
</button>
</div>
</template>

View File

@@ -29,12 +29,8 @@ const submit = () => {
const pixQrCode = pix({
pixKey: pixModel.value.pixKey,
merchantName: pixModel.value.name.trim()
? pixModel.value.name
: "name",
merchantCity: pixModel.value.city.trim()
? pixModel.value.city
: "city",
merchantName: pixModel.value.name.trim() ? pixModel.value.name : "name",
merchantCity: pixModel.value.city.trim() ? pixModel.value.city : "city",
transactionId: pixModel.value.transactionId.trim()
? pixModel.value.transactionId
: "***",