-

-
- Ethereum
-
-

+

+
Ethereum
+
-

+
{{ formatWalletAddress() }}
-

+
-
-
MBRZ: {{ formatWalletBalance() }}
+
+
+ MBRZ: {{ formatWalletBalance() }}
+
@@ -92,18 +75,18 @@ header {
@apply flex flex-row justify-between w-full items-center;
}
-.default-button{
- @apply px-4 py-2 rounded text-gray-50 font-semibold text-base
+.default-button {
+ @apply px-4 py-2 rounded text-gray-50 font-semibold text-base;
}
-.account-info{
- @apply flex items-center gap-6
+.account-info {
+ @apply flex items-center gap-6;
}
-.default-text{
- @apply text-gray-50 font-semibold text-base
+.default-text {
+ @apply text-gray-50 font-semibold text-base;
}
-.top-bar-info{
- @apply flex justify-between gap-2 px-4 py-2 border-amber-500 border-2 rounded
+.top-bar-info {
+ @apply flex justify-between gap-2 px-4 py-2 border-amber-500 border-2 rounded;
}
diff --git a/src/model/Pix.ts b/src/model/Pix.ts
index 2bb546d..bb96b27 100644
--- a/src/model/Pix.ts
+++ b/src/model/Pix.ts
@@ -1,11 +1,11 @@
export type Pix = {
- pixKey: string;
- merchantCity?: string;
- merchantName?: string;
- value?: number;
- transactionId?: string;
- message?: string;
- cep?: string;
- currency?: number;
- countryCode?: string;
- };
\ No newline at end of file
+ pixKey: string;
+ merchantCity?: string;
+ merchantName?: string;
+ value?: number;
+ transactionId?: string;
+ message?: string;
+ cep?: string;
+ currency?: number;
+ countryCode?: string;
+};
diff --git a/src/utils/QrCodePix.ts b/src/utils/QrCodePix.ts
index 05f410a..b75b676 100644
--- a/src/utils/QrCodePix.ts
+++ b/src/utils/QrCodePix.ts
@@ -1,7 +1,7 @@
import qrcode from "qrcode";
import type { QRCodeToDataURLOptions } from "qrcode";
import { crc16ccitt } from "crc";
-import {type Pix } from "@/model/Pix";
+import { type Pix } from "@/model/Pix";
const pix = ({
pixKey,
diff --git a/src/utils/ethers.ts b/src/utils/ethers.ts
index 4081830..071a89c 100644
--- a/src/utils/ethers.ts
+++ b/src/utils/ethers.ts
@@ -2,16 +2,15 @@ import { useEtherStore } from "@/store/ether";
import { ethers } from "ethers";
// smart contract imports
-import mockToken from "./smart_contract_files/MockToken.json"
-import p2pix from "./smart_contract_files/P2PIX.json"
-import addresses from "./smart_contract_files/localhost.json"
-
+import mockToken from "./smart_contract_files/MockToken.json";
+//import p2pix from "./smart_contract_files/P2PIX.json";
+import addresses from "./smart_contract_files/localhost.json";
const updateWalletStatus = async (walletAddress: string) => {
const etherStore = useEtherStore();
const provider = getProvider();
- if(!provider) return;
-
+ if (!provider) return;
+
const signer = provider.getSigner();
const contract = new ethers.Contract(addresses.token, mockToken.abi, signer);
@@ -46,14 +45,17 @@ const connectProvider = async () => {
const makeTransaction = async () => {
const etherStore = useEtherStore();
const provider = getProvider();
- if(!provider) return;
+ if (!provider) return;
const signer = provider.getSigner();
const contract = new ethers.Contract(addresses.token, mockToken.abi, signer);
- const fixedAccount1Address = "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
- const tx = await contract.transfer(fixedAccount1Address, ethers.utils.parseEther("100.0"));
- await tx.wait()
+ const fixedAccount1Address = "0x70997970C51812dc3A010C7d01b50e0d17dc79C8";
+ const tx = await contract.transfer(
+ fixedAccount1Address,
+ ethers.utils.parseEther("100.0")
+ );
+ await tx.wait();
updateWalletStatus(etherStore.walletAddress);
};
@@ -70,6 +72,6 @@ const getProvider = (): ethers.providers.Web3Provider | null => {
if (!connection) return null;
return new ethers.providers.Web3Provider(connection);
-}
+};
export default { connectProvider, formatEther, makeTransaction };
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index dd302d7..20d2bfe 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -1,5 +1,5 @@
-
+
+ Home View
diff --git a/src/views/QrCodeForm.vue b/src/views/QrCodeForm.vue
index ec7cdb0..980c4d4 100644
--- a/src/views/QrCodeForm.vue
+++ b/src/views/QrCodeForm.vue
@@ -88,7 +88,9 @@ const submit = () => {
-
+
(Esse campo é obrigatório)
@@ -167,9 +169,7 @@ const submit = () => {
>
{{ pixModel.value }}
-
+
Código QR Code:
{{ qrCodePayload }}
@@ -179,10 +179,7 @@ const submit = () => {