update m issues + digit change numbers
This commit is contained in:
@@ -1,18 +1,6 @@
|
||||
<template>
|
||||
<div class="approve-card">
|
||||
<div class="left-side low-mid-text">
|
||||
Transaction<br />
|
||||
Successful
|
||||
</div>
|
||||
<div class="right-side">
|
||||
<div class="btn btn-immortal tiny-text" v-if="stateComputed === 1" @click="sacrificeClick">
|
||||
Sacrifice 🩸
|
||||
</div>
|
||||
<div class="btn btn-immortal tiny-text" disabled v-if="stateComputed === 2">Sign Transaction</div>
|
||||
<div class="btn btn-immortal tiny-text" disabled v-if="stateComputed === 3">
|
||||
<loading-component></loading-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="left-side low-mid-text">Transaction Successful</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
@@ -44,41 +32,6 @@ const splashBlood = inject("splashBlood");
|
||||
function closeToast() {
|
||||
toast.dismiss(id);
|
||||
}
|
||||
|
||||
const stateComputed = computed(() => {
|
||||
let returnState = 0;
|
||||
if (
|
||||
sacrificeStore.sacrificeNumber === null ||
|
||||
sacrificeStore.sacrificeNumber === "" ||
|
||||
sacrificeStore.sacrificeNumber === 0
|
||||
) {
|
||||
returnState = 0;
|
||||
} else if (sacrificeStore.sacrificeState === 2) {
|
||||
returnState = 2;
|
||||
} else if (sacrificeStore.sacrificeState === 3) {
|
||||
returnState = 3;
|
||||
} else if (
|
||||
sacrificeStore.sacrificeNumber !== null ||
|
||||
sacrificeStore.sacrificeNumber !== "" ||
|
||||
sacrificeStore.sacrificeNumber > 0
|
||||
) {
|
||||
returnState = 1;
|
||||
}
|
||||
return returnState;
|
||||
});
|
||||
|
||||
async function sacrificeClick() {
|
||||
try {
|
||||
var result = await sacrificeStore.sacrificeToken(sacrificeStore.sacrificeNumber, tokenStore.activeToken);
|
||||
if (result) {
|
||||
emit("sacrificed");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("error", error);
|
||||
} finally {
|
||||
closeToast();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="sass">
|
||||
.Vue-Toastification__container
|
||||
|
||||
Reference in New Issue
Block a user