forked from Qortal/qortal-ui
Fix avatar on new accounts
This commit is contained in:
parent
664a671fee
commit
af52bb27d3
@ -124,10 +124,14 @@ class WalletProfile extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getAvatar() {
|
getAvatar() {
|
||||||
const avatarNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
if (this.accountInfo.names.length === 0) {
|
||||||
const avatarUrl = avatarNode.protocol + '://' + avatarNode.domain + ':' + avatarNode.port
|
return html`<img class="round-fullinfo" src="/img/incognito.png">`
|
||||||
const url = `${avatarUrl}/arbitrary/THUMBNAIL/${this.accountInfo.names[0].name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
} else {
|
||||||
return html`<img class="round-fullinfo" src="${url}" onerror="this.src='/img/incognito.png';" />`
|
const avatarNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
|
const avatarUrl = avatarNode.protocol + '://' + avatarNode.domain + ':' + avatarNode.port
|
||||||
|
const url = `${avatarUrl}/arbitrary/THUMBNAIL/${this.accountInfo.names[0].name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||||
|
return html`<img class="round-fullinfo" src="${url}" onerror="this.src='/img/incognito.png';" />`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user