质押cec 绑定passport账号-ing
This commit is contained in:
parent
daa393f51c
commit
07a77d6bb3
@ -29,7 +29,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div>Convert remaining time</div>
|
<div>Convert remaining time</div>
|
||||||
<span>$0.57</span>
|
<span>{{ timeStaking(Number(stakingStore.cecInfoData.lastDepositTime)) }}</span>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
<div class="arrows">
|
<div class="arrows">
|
||||||
@ -45,16 +45,16 @@
|
|||||||
<div class="amount">{{ priceCalculated(stakingStore.cecInfoData.CecClaimable) }}</div>
|
<div class="amount">{{ priceCalculated(stakingStore.cecInfoData.CecClaimable) }}</div>
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<span v-if="stakingStore.cecInfoData.esCecBalance" @click="conversionModal">Staking</span>
|
<span v-if="stakingStore.cecInfoData.esCecBalance" @click="conversionModal">Convert</span>
|
||||||
<span v-else class="no">Staking</span>
|
<span v-else class="no">Convert</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<span v-if="stakingStore.cecInfoData.esCecConversion" @click="withdrawModal">Disarm</span>
|
<span v-if="stakingStore.cecInfoData.esCecConversion" @click="withdrawModal">Cancel</span>
|
||||||
<span v-else class="no">Disarm</span>
|
<span v-else class="no">Cancel</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<span v-if="stakingStore.cecInfoData.CecClaimable" @click="claimModal">Collection</span>
|
<span v-if="stakingStore.cecInfoData.CecClaimable" @click="claimModal">Claim</span>
|
||||||
<span v-else class="no">Collection</span>
|
<span v-else class="no">Claim</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -72,7 +72,7 @@ import LoadingDialog from "@/components/Dialogs/loadingDialog.vue"
|
|||||||
import ConfirmDialog from "@/components/Dialogs/confirmDialog.vue";
|
import ConfirmDialog from "@/components/Dialogs/confirmDialog.vue";
|
||||||
import {createModal} from "@/utils/model.util";
|
import {createModal} from "@/utils/model.util";
|
||||||
import { STAKING_ADDRESSES } from "@/configs/configchain"
|
import { STAKING_ADDRESSES } from "@/configs/configchain"
|
||||||
import { priceCalculated } from "@/configs/priceCalculate"
|
import { priceCalculated, timeStaking } from "@/configs/priceCalculate"
|
||||||
import {walletStore} from "@/store/wallet";
|
import {walletStore} from "@/store/wallet";
|
||||||
import { useStakingStore } from "@/store/staking"
|
import { useStakingStore } from "@/store/staking"
|
||||||
import { BlockChain } from "@/components/chain/BlockChain"
|
import { BlockChain } from "@/components/chain/BlockChain"
|
||||||
|
@ -168,6 +168,7 @@ const cecInfoData = ref({
|
|||||||
* 查询当前用户存储的EsCEC数量(转化+未转化) queryVestedTotal
|
* 查询当前用户存储的EsCEC数量(转化+未转化) queryVestedTotal
|
||||||
* 查询当前用户可以领取的CEC数量 queryClaimable
|
* 查询当前用户可以领取的CEC数量 queryClaimable
|
||||||
* 查询用户已经领取的CEC总量 queryClaimabledAll
|
* 查询用户已经领取的CEC总量 queryClaimabledAll
|
||||||
|
* 查询最后转化存入的时间 queryLastDepositTime
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const getCecData = async () => {
|
const getCecData = async () => {
|
||||||
@ -197,6 +198,7 @@ const getCecData = async () => {
|
|||||||
cecInfoData.value.esCecClaim = BigInt(await bc.staking.queryCumulativeByEsCEC());
|
cecInfoData.value.esCecClaim = BigInt(await bc.staking.queryCumulativeByEsCEC());
|
||||||
cecInfoData.value.CecClaimable = BigInt(await bc.vester.queryClaimable())
|
cecInfoData.value.CecClaimable = BigInt(await bc.vester.queryClaimable())
|
||||||
cecInfoData.value.cecClaimAll = BigInt(await bc.vester.queryClaimabledAll())
|
cecInfoData.value.cecClaimAll = BigInt(await bc.vester.queryClaimabledAll())
|
||||||
|
cecInfoData.value.lastDepositTime = BigInt(await bc.vester.queryLastDepositTime())
|
||||||
cecInfoData.value.totalCollection = cecInfoData.value.CecCollection + cecInfoData.value.esCecCollection;
|
cecInfoData.value.totalCollection = cecInfoData.value.CecCollection + cecInfoData.value.esCecCollection;
|
||||||
stakingStore.cecInfoData = cecInfoData.value;
|
stakingStore.cecInfoData = cecInfoData.value;
|
||||||
// getCode()
|
// getCode()
|
||||||
|
@ -196,11 +196,11 @@ const eventBtnName = (val) => {
|
|||||||
// cec stake
|
// cec stake
|
||||||
const cecStakingText = async () => {
|
const cecStakingText = async () => {
|
||||||
// console.log(localWalletStore.refreshToken)
|
// console.log(localWalletStore.refreshToken)
|
||||||
if(!stakingStore.bindPassportAddress) {
|
// if(!stakingStore.bindPassportAddress) {
|
||||||
await new BlockChain().appendPassport()
|
// await new BlockChain().appendPassport()
|
||||||
let res = await apiBindPassport({passport_jwt: 'Bearer '+localWalletStore.refreshToken})
|
// let res = await apiBindPassport({passport_jwt: 'Bearer '+localWalletStore.refreshToken})
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
} else {
|
// } else {
|
||||||
// console.log(localWalletStore.refreshToken)
|
// console.log(localWalletStore.refreshToken)
|
||||||
// return
|
// return
|
||||||
cecDialogVisible.value = true
|
cecDialogVisible.value = true
|
||||||
@ -210,7 +210,7 @@ const cecStakingText = async () => {
|
|||||||
typeName: "CEC",
|
typeName: "CEC",
|
||||||
amount: stakingStore.cecInfoData.cecBalance
|
amount: stakingStore.cecInfoData.cecBalance
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeCecStakedText = () => {
|
const closeCecStakedText = () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user