add avatar to account
This commit is contained in:
parent
17ecb81f12
commit
9853f2b455
2 changed files with 19 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue