From 65b19845d1d2f03d3e3f760e657900ec4a4d721a Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Thu, 13 Jul 2023 11:02:12 +0300 Subject: [PATCH] chore: code clean-up --- .../customer-orders/customer-orders.js | 4 -- .../components/market-config/market-config.js | 39 ------------------- static/js/market.js | 2 - 3 files changed, 45 deletions(-) diff --git a/static/components/customer-orders/customer-orders.js b/static/components/customer-orders/customer-orders.js index fcb593a..0aa943a 100644 --- a/static/components/customer-orders/customer-orders.js +++ b/static/components/customer-orders/customer-orders.js @@ -89,10 +89,6 @@ async function customerOrders(path) { } }, created() { - console.log('### orders', this.orders) - console.log('### products', this.products) - console.log('### stall', this.stalls) - console.log('### merchants', this.merchants) } }) } diff --git a/static/components/market-config/market-config.js b/static/components/market-config/market-config.js index 27b3f29..b81c400 100644 --- a/static/components/market-config/market-config.js +++ b/static/components/market-config/market-config.js @@ -29,45 +29,6 @@ async function marketConfig(path) { removeMerchant: async function (publicKey) { this.$emit('remove-merchant', publicKey) }, - // async addPubkey(pubkey) { - // if (!pubkey) { - // pubkey = String(this.inputPubkey).trim() - // } - // let regExp = /^#([0-9a-f]{3}){1,2}$/i - // if (pubkey.startsWith('n')) { - // try { - // let { type, data } = NostrTools.nip19.decode(pubkey) - // if (type === 'npub') pubkey = data - // else if (type === 'nprofile') { - // pubkey = data.pubkey - // givenRelays = data.relays - // } - // } catch (err) { - // console.error(err) - // } - // } else if (regExp.test(pubkey)) { - // pubkey = pubkey - // } - // this.pubkeys.add(pubkey) - // this.inputPubkey = null - // this.$q.localStorage.set( - // `diagonAlley.merchants`, - // Array.from(this.pubkeys) - // ) - // // this.initNostr()// todo: emit - // }, - // removePubkey(pubkey) { - // // Needs a hack for Vue reactivity - // let pubkeys = this.pubkeys - // pubkeys.delete(pubkey) - // this.profiles.delete(pubkey) - // this.pubkeys = new Set(Array.from(pubkeys)) - // this.$q.localStorage.set( - // `diagonAlley.merchants`, - // Array.from(this.pubkeys) - // ) - // // this.initNostr() // todo: emit - // }, }, created: async function () { diff --git a/static/js/market.js b/static/js/market.js index e637162..0e224a8 100644 --- a/static/js/market.js +++ b/static/js/market.js @@ -107,7 +107,6 @@ const market = async () => { computed: { filterProducts() { let products = this.products - console.log('### this.products', this.products) if (this.activeStall) { products = products.filter(p => p.stall_id == this.activeStall) } @@ -379,7 +378,6 @@ const market = async () => { this.accountMetadata = this.profiles.get(this.account.pubkey) } this.merchants.filter(m => m.publicKey === e.pubkey).forEach(m => m.profile = e.content) - console.log('### this.merchants', this.merchants) return } else if (e.kind == 30018) { //it's a product `d` is the prod. id