From bbfcac3b6d2987e65f83fcbf6dbbcdf525338a52 Mon Sep 17 00:00:00 2001 From: Sceat Date: Mon, 11 Nov 2024 04:15:47 +0800 Subject: [PATCH] fix: unused env --- src/components/cards/market-categories.vue | 1 - src/env.js | 9 +-------- src/views/tab-workshop.vue | 11 +---------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/components/cards/market-categories.vue b/src/components/cards/market-categories.vue index 532f4604..152082a3 100644 --- a/src/components/cards/market-categories.vue +++ b/src/components/cards/market-categories.vue @@ -57,7 +57,6 @@ import { } from '@aresrpg/aresrpg-sdk/items'; import { watch, ref, inject, onMounted, onUnmounted } from 'vue'; -import { VITE_INDEXER_URL } from '../../env.js'; import { pretty_print_mists } from '../../core/sui/client.js'; // @ts-ignore import { context } from '../../core/game/game.js'; diff --git a/src/env.js b/src/env.js index 27abff85..def95af7 100644 --- a/src/env.js +++ b/src/env.js @@ -2,16 +2,9 @@ const { VITE_SUI_RPC = 'https://fullnode.testnet.sui.io', VITE_SERVER_URL, VITE_SPONSOR_URL = 'https://testnet-sponsor.aresrpg.world', - VITE_INDEXER_URL = 'https://testnet-indexer.aresrpg.world', VITE_ENOKI_KEY = 'enoki_public_ff89078fe8efa82d3f14732264813b91', VITE_NETWORK = 'testnet', } = import.meta.env export const NETWORK = VITE_NETWORK -export { - VITE_SUI_RPC, - VITE_SERVER_URL, - VITE_ENOKI_KEY, - VITE_SPONSOR_URL, - VITE_INDEXER_URL, -} +export { VITE_SUI_RPC, VITE_SERVER_URL, VITE_ENOKI_KEY, VITE_SPONSOR_URL } diff --git a/src/views/tab-workshop.vue b/src/views/tab-workshop.vue index 89733498..84767b99 100644 --- a/src/views/tab-workshop.vue +++ b/src/views/tab-workshop.vue @@ -26,7 +26,7 @@ import sectionHeader from '../components/misc/section-header.vue'; import recipeVue from '../components/cards/recipe.vue'; import itemInventory from '../components/cards/item-inventory.vue'; import itemDescription from '../components/cards/item-description.vue'; -import { NETWORK, VITE_INDEXER_URL } from '../env.js'; +import { NETWORK } from '../env.js'; // @ts-ignore import tailor_icon from '../assets/jobs/tailor.png'; // @ts-ignore @@ -43,15 +43,6 @@ const jobs = [ { name: t('APP_TAB_WORKSHOP_WOODCUTTER'), level: 1, icon: woodcutter_icon }, ]; -async function refresh_recipes() { - const result = await fetch(`${VITE_INDEXER_URL}/recipes`); - const { recipes, cursor } = await result.json(); - - recipes.forEach(recipe => recipe.ingredients); - - indexed_recipes.value = recipes; -} - function on_recipe_create(recipe) { indexed_recipes.value.push(recipe); }