diff --git a/.env b/.env index 222554ad..45bac475 100644 --- a/.env +++ b/.env @@ -1,10 +1,14 @@ +#VITE_API_COSMOS="http://lxgr.xyz:1317" +#VITE_WS_TENDERMINT="http://lxgr.xyz:26657" +#VITE_APP_FAUCET="http://lxgr.xyz:4500/claimTokens" + VITE_API_COSMOS="https://cardchain.crowdcontrol.network/cosmos/" VITE_WS_TENDERMINT="https://cardchain.crowdcontrol.network/tendermint/" VITE_APP_FAUCET="https://cardchain.crowdcontrol.network/faucet/claimTokens" VITE_APP_FAUCET_SITEKEY="ea68532a-a9e6-4f99-9361-db90a3071b72" VITE_APP_ADDRESS_PREFIX=cc -VITE_APP_CHAIN_ID="cardtestnet-5" +VITE_APP_CHAIN_ID="cardtestnet-6" VITE_APP_CHAIN_NAME="Cardchain" VITE_APP_CARDIMG_MAXKB=500 VITE_APP_CARDIMG_SIZE_X=840 diff --git a/package-lock.json b/package-lock.json index 60d4c327..3e5782f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.25", + "decentralcardgame-cardchain-client-ts": "0.0.25", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", diff --git a/package.json b/package.json index 22780142..d59459c8 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.25", + "decentralcardgame-cardchain-client-ts": "0.0.25", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", diff --git a/src/views/CardCreatorPage.vue b/src/views/CardCreatorPage.vue index 4aa96939..c3ee9237 100644 --- a/src/views/CardCreatorPage.vue +++ b/src/views/CardCreatorPage.vue @@ -1083,7 +1083,7 @@ export default { ) return } - if (this.designateArtist && !this.$cardChain.validAddress(this.artistAddress)) { + if (this.designateArtist && !validAddress(this.artistAddress)) { this.notifyFail( "Invalid Address", "The address given for designated artist is invalid." @@ -1167,6 +1167,20 @@ export default { this.abilities ); } + // if an ability was created, but it has no effect, then this should be fixed + if (newModel.Abilities.length > 0) { + let effectsList = R.flatten(R.map( + x => R.values(R.pluck("Effects", x)), + newModel.Abilities)) + + if (R.any(y => y === undefined, effectsList)) { + this.notifyFail( + "Useless Ability", + "Card has an Ability, which does not do anything. Please add an Effect to the Ability." + ); + return; + } + } } else if (this.model.type === "Action") { // check if the old effects should be restored if (this.mode == Mode.EDIT && !this.clearAbilities && R.isEmpty(this.abilities)) { @@ -1183,20 +1197,15 @@ export default { this.abilities ); } - } - - // if an ability was created, but it has no effect, then this should be fixed - if (newModel.Abilities.length > 0) { - let effectsList = R.flatten(R.map( - x => R.values(R.pluck("Effects", x)), - newModel.Abilities)) - - if (R.any(y => y === undefined, effectsList)) { + // if an ability was created, but it has no effect, then this should be fixed + if (newModel.Effects.length == 0) { + console.log("newmodel", newModel) this.notifyFail( - "Useless Ability", - "Card has an Ability, which does not do anything. Please add an Effect to the Ability." + "No Effects", + "Card has no effect. Maybe you forgot to add an effect?" ); return; + } }