From 92502755bec1c9fe7198ddc48b9e8b081d2d557e Mon Sep 17 00:00:00 2001 From: yuyongdong Date: Mon, 22 Jul 2024 16:00:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/assets/cenCard.vue | 1 + src/components/assets/myCard.vue | 20 ++++++++++++++++++-- src/views/DetailView.vue | 19 +++++++++++++++++-- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/components/assets/cenCard.vue b/src/components/assets/cenCard.vue index c193cf9..d583811 100644 --- a/src/components/assets/cenCard.vue +++ b/src/components/assets/cenCard.vue @@ -130,6 +130,7 @@ const mintHero = async () => { if(marketplaceStore.userGold < 0) { const confirmResult = await createModal(ConfirmDialog, { title: '', + noBtnTitle: '', message: 'Mint Failed - Negative in-game gold balance. Please adjust your balance to continue.' }).show() } else { diff --git a/src/components/assets/myCard.vue b/src/components/assets/myCard.vue index e075ec9..cc354dd 100644 --- a/src/components/assets/myCard.vue +++ b/src/components/assets/myCard.vue @@ -172,7 +172,12 @@ const lockToGameConfirm = async () => { try { const bc = new BlockChain() let res = await bc.locker.lock(toRaw(props.nftData).contract_address, [toRaw(props.nftData).token_id]) - message.success('lockToGame success') + // message.success('lockToGame success') + const confirmResult = await createModal(ConfirmDialog, { + title: '', + noBtnTitle: '', + message: 'Staking is complete. This process may take 3-4 minutes.' + }).show() // router.go(-1) emit('renewMyNft') loadingDialogVisible.value = false @@ -191,7 +196,12 @@ const unlockMainConfirm = async () => { try { const bc = new BlockChain() let res = await bc.locker.lockMain(toRaw(props.nftData).contract_address, [toRaw(props.nftData).token_id]) - message.success('lockToGame success') + // message.success('lockToGame success') + const confirmResult = await createModal(ConfirmDialog, { + title: '', + noBtnTitle: '', + message: 'Staking is complete. This process may take 3-4 minutes.' + }).show() // router.go(-1) emit('renewMyNft') loadingDialogVisible.value = false @@ -246,6 +256,7 @@ const heroLock = async (data) => { // message.success('Unstake success.') const confirmResult = await createModal(ConfirmDialog, { title: '', + noBtnTitle: '', message: 'Unstake success. It is expected to take 3-4 minutes. Please log in to the original wallet address to check later.' }).show() loadingDialogVisible.value = false @@ -254,6 +265,7 @@ const heroLock = async (data) => { }, 2000); } } catch (e) { + console.log(e) loadingDialogVisible.value = false if(e.message.indexOf('rejected') > -1) { message.error('User rejected the request') @@ -274,6 +286,7 @@ const founderLock = async (data) => { // message.success('Unstake success.') const confirmResult = await createModal(ConfirmDialog, { title: '', + noBtnTitle: '', message: 'Unstake success. It is expected to take 3-4 minutes. Please log in to the original wallet address to check later.' }).show() loadingDialogVisible.value = false @@ -282,11 +295,14 @@ const founderLock = async (data) => { }, 2000); } } catch (e) { + console.log(e); loadingDialogVisible.value = false if(e.message.indexOf('rejected') > -1) { message.error('User rejected the request') } else if (e.message.indexOf('select wallet') > -1) { message.error('user cancel select wallet') + } else if (e.message.indexOf('eoa address changed') > -1) { + message.error("It looks like there's an issue with your MetaMask or OKX wallet address. Please check your wallet address and try again") } else { message.error('Unstake fail') } diff --git a/src/views/DetailView.vue b/src/views/DetailView.vue index 4a46227..a778c8e 100644 --- a/src/views/DetailView.vue +++ b/src/views/DetailView.vue @@ -335,7 +335,12 @@ const lockToGame = async(type) => { const lockToGameConfirm = async () => { try { await new BlockChain().locker.lock(detailData.value.nft.contract_address, [detailData.value.nft.token_id]) - message.success('lockToGame success') + // message.success('lockToGame success') + const confirmResult = await createModal(ConfirmDialog, { + title: '', + noBtnTitle: '', + message: 'Staking is complete. This process may take 3-4 minutes.' + }).show() loadingDialogVisible.value = false router.go(-1) } catch (e) { @@ -351,7 +356,12 @@ const unlockMainConfirm = async () => { try { const bc = new BlockChain() let res = await bc.locker.lockMain(detailData.value.nft.contract_address, [detailData.value.nft.token_id]) - message.success('lockToGame success') + // message.success('lockToGame success') + const confirmResult = await createModal(ConfirmDialog, { + title: '', + noBtnTitle: '', + message: 'Staking is complete. This process may take 3-4 minutes.' + }).show() // router.go(-1) emit('renewMyNft') loadingDialogVisible.value = false @@ -392,6 +402,7 @@ const heroLock = async () => { // message.success('Unstake success.') const confirmResult = await createModal(ConfirmDialog, { title: '', + noBtnTitle: '', message: 'Unstake success. It is expected to take 3-4 minutes. Please log in to the original wallet address to check later.' }).show() loadingDialogVisible.value = false @@ -420,6 +431,7 @@ const founderLock = async () => { // message.success('Unstake success.') const confirmResult = await createModal(ConfirmDialog, { title: '', + noBtnTitle: '', message: 'Unstake success. It is expected to take 3-4 minutes. Please log in to the original wallet address to check later.' }).show() loadingDialogVisible.value = false @@ -433,6 +445,8 @@ const founderLock = async () => { message.error('User rejected the request') } else if (e.message.indexOf('select wallet') > -1) { message.error('user cancel select wallet') + } else if (e.message.indexOf('eoa address changed') > -1) { + message.error("It looks like there's an issue with your MetaMask or OKX wallet address. Please check your wallet address and try again") } else { message.error('Unstake fail') } @@ -528,6 +542,7 @@ const mintHero = async () => { if(marketplaceList.userGold < 0) { const confirmResult = await createModal(ConfirmDialog, { title: '', + noBtnTitle: '', message: 'Mint Failed - Negative in-game gold balance. Please adjust your balance to continue.' }).show() } else {