diff --git a/static/js/market.js b/static/js/market.js index 489558b..575d905 100644 --- a/static/js/market.js +++ b/static/js/market.js @@ -34,6 +34,7 @@ const market = async () => { data: function () { return { account: null, + accountMetadata: null, accountDialog: { show: false, data: { @@ -106,6 +107,9 @@ const market = async () => { if (merchants && merchants.length) { this.pubkeys = new Set(merchants) } + if (this.account) { + this.pubkeys.add(this.account.pubkey) + } if (relays && relays.length) { this.relays = new Set([...defaultRelays, ...relays]) } else { @@ -243,6 +247,9 @@ const market = async () => { this.events.map(eventToObj).map(e => { if (e.kind == 0) { this.profiles.set(e.pubkey, e.content) + if (e.pubkey == this.account.pubkey) { + this.accountMetadata = this.profiles.get(this.account.pubkey) + } return } else if (e.kind == 30018) { //it's a product `d` is the prod. id diff --git a/templates/nostrmarket/market.html b/templates/nostrmarket/market.html index 3a8bb75..fa95ac7 100644 --- a/templates/nostrmarket/market.html +++ b/templates/nostrmarket/market.html @@ -7,11 +7,19 @@