applying default structure order

This commit is contained in:
Ronyell 2022-11-29 22:40:18 -03:00
parent 89ab78d682
commit 5ab8dcc8ea
2 changed files with 8 additions and 3 deletions

View File

@ -6,16 +6,22 @@ import { useEtherStore } from "@/store/ether";
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
import blockchain from "../utils/blockchain"; import blockchain from "../utils/blockchain";
// Store reference
const etherStore = useEtherStore(); const etherStore = useEtherStore();
const { walletAddress, depositList } = storeToRefs(etherStore); const { walletAddress, depositList } = storeToRefs(etherStore);
// Reactive state
const tokenValue = ref(0); const tokenValue = ref(0);
const enableSelectButton = ref(false); const enableSelectButton = ref(false);
const hasLiquidity = ref(true); const hasLiquidity = ref(true);
const validDecimals = ref(true); const validDecimals = ref(true);
const selectedDeposit = ref(); const selectedDeposit = ref();
// Emits
const emit = defineEmits(["tokenBuy"]);
// Methods
const connectAccount = async () => { const connectAccount = async () => {
await blockchain.connectProvider(); await blockchain.connectProvider();
verifyLiquidity(); verifyLiquidity();
@ -72,9 +78,6 @@ const verifyLiquidity = () => {
hasLiquidity.value = false; hasLiquidity.value = false;
} }
}; };
const emit = defineEmits(["tokenBuy"]);
</script> </script>
<template> <template>

View File

@ -3,10 +3,12 @@ import { storeToRefs } from "pinia";
import { useEtherStore } from "../store/ether"; import { useEtherStore } from "../store/ether";
import blockchain from "../utils/blockchain"; import blockchain from "../utils/blockchain";
// Store reference
const etherStore = useEtherStore(); const etherStore = useEtherStore();
const { walletAddress, balance } = storeToRefs(etherStore); const { walletAddress, balance } = storeToRefs(etherStore);
//Methods
const connectMetaMask = () => { const connectMetaMask = () => {
blockchain.connectProvider(); blockchain.connectProvider();
}; };