diff --git a/src/components/admin/createProjectSlider/components/PrizeEventActionConfig.vue b/src/components/admin/createProjectSlider/components/PrizeEventActionConfig.vue index bc83d100..99aa0179 100644 --- a/src/components/admin/createProjectSlider/components/PrizeEventActionConfig.vue +++ b/src/components/admin/createProjectSlider/components/PrizeEventActionConfig.vue @@ -361,6 +361,10 @@ export default { }, handleEventActionUpdate() { // Code to update an Action + const data = {...this.prizeDetails} + if(data.hasOwnProperty('isDistributed') && data.isDistributed=== true) { + return this.notifyErr('Reward has been distributed for this prize you cannot edit it!') + } let isvalid = this.handleEventActionValidation(); if (isvalid) { this.selected.value = JSON.stringify(this.prizeDetails); diff --git a/src/components/admin/marketPlaceSlider/marketPlaceSlide.vue b/src/components/admin/marketPlaceSlider/marketPlaceSlide.vue index e9f24000..437cc334 100644 --- a/src/components/admin/marketPlaceSlider/marketPlaceSlide.vue +++ b/src/components/admin/marketPlaceSlider/marketPlaceSlide.vue @@ -759,7 +759,7 @@ export default { const returnOldTreeId = Number(oldTreeId) + 1 return returnOldTreeId } catch (e) { - throw new Error(e) + throw new Error(e.message) } }, prizeCardSelectedForAirdrop(prize) { diff --git a/src/components/participant/ActionInputs/RewardClaimAction.vue b/src/components/participant/ActionInputs/RewardClaimAction.vue index fa6d3fd5..01ee1cc7 100644 --- a/src/components/participant/ActionInputs/RewardClaimAction.vue +++ b/src/components/participant/ActionInputs/RewardClaimAction.vue @@ -305,7 +305,7 @@ export default { throw new Error("Reward already claimed"); } } catch (e) { - this.notifyErr(e); + this.notifyErr(e.message); } finally { this.isLoading = false; } @@ -370,16 +370,18 @@ only screen and (max-width: 760px), tr { border: 1px solid #dee2e6} td { border: none; + font-size: 0.9rem; border-bottom: 1px solid #dee2e6; position: relative; - padding-left: 50%; + padding-left: 60%; } th { border: none; + font-size:1rem; border-bottom: 1px solid #dee2e6; background: #ccc; position: relative; - padding-left: 50%; + padding-left: 60%; } td:before { diff --git a/src/mixins/getWeb3.js b/src/mixins/getWeb3.js index 8a6712d6..e93194c2 100644 --- a/src/mixins/getWeb3.js +++ b/src/mixins/getWeb3.js @@ -1,6 +1,8 @@ import Web3 from 'web3' -async function loadWeb3(inDecimal) { +async function loadWeb3(inDecimal) { + try{ + if(window.ethereum){ const chain = Web3.utils.toHex(inDecimal); window.web3 = new Web3(window.ethereum); @@ -83,14 +85,18 @@ async function loadWeb3(inDecimal) { } } } - await window.ethereum.request({ method: "eth_requestAccounts" }); - return window.web3; - }else if(window.web3){ + await window.ethereum.request({ method: "eth_requestAccounts" }); + return window.web3; + + }else if(window.web3){ window.web3 = new Web3(window.web3.currentProvider); return window.web3; }else{ throw new Error("Install Metamask browser extention"); } + }catch(e) { + throw new Error(e) + } } export default loadWeb3; \ No newline at end of file