applying default structure order
This commit is contained in:
parent
89ab78d682
commit
5ab8dcc8ea
@ -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>
|
||||||
|
@ -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();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user