defining default values in makeTransaction function signature

This commit is contained in:
RcleydsonR
2022-11-22 08:35:24 -03:00
parent 15e5fed07b
commit 7256d59b49
2 changed files with 9 additions and 7 deletions

View File

@@ -1,14 +1,14 @@
<script setup lang="ts">
import { storeToRefs } from "pinia";
import { useEtherStore } from "../store/ether";
import ethers from "../utils/ethers";
import blockchain from "../utils/blockchain";
const etherStore = useEtherStore();
const { walletAddress, balance } = storeToRefs(etherStore);
const connectMetaMask = () => {
ethers.connectProvider();
blockchain.connectProvider();
};
const formatWalletAddress = (): string => {
@@ -22,7 +22,7 @@ const formatWalletAddress = (): string => {
};
const formatWalletBalance = (): string => {
const formattedBalance = ethers.formatEther(balance.value);
const formattedBalance = blockchain.formatEther(balance.value);
const fixed = formattedBalance.substring(0, 8);
return fixed;