fix display name

This commit is contained in:
PhilReact 2025-04-12 07:40:41 +03:00
parent 3c3e1d6e38
commit d51216516d

View File

@ -1634,10 +1634,16 @@ class WebBrowser extends LitElement {
} }
const getArbitraryFee = await this.getArbitraryFee() const getArbitraryFee = await this.getArbitraryFee()
feeAmount = getArbitraryFee.fee feeAmount = getArbitraryFee.fee
const reformatResources = resources.map((resource)=> {
return {
...resource,
name: resource.name || this.getMyName()
}
})
const res2 = await showModalAndWait( const res2 = await showModalAndWait(
actions.PUBLISH_MULTIPLE_QDN_RESOURCES, actions.PUBLISH_MULTIPLE_QDN_RESOURCES,
{ {
resources, resources: reformatResources,
encrypt: data.encrypt, encrypt: data.encrypt,
feeAmount: getArbitraryFee.feeToShow feeAmount: getArbitraryFee.feeToShow
} }
@ -1652,7 +1658,7 @@ class WebBrowser extends LitElement {
} }
let failedPublishesIdentifiers = [] let failedPublishesIdentifiers = []
this.loader.show() this.loader.show()
for (const resource of resources) { for (const resource of reformatResources) {
try { try {
const requiredFields = ['service'] const requiredFields = ['service']
const missingFields = [] const missingFields = []
@ -1679,7 +1685,7 @@ class WebBrowser extends LitElement {
continue continue
} }
const service = resource.service const service = resource.service
const name = data.name || this.getMyName() const name = resource.name
if(!name){ if(!name){
const errorMsg = `Missing name` const errorMsg = `Missing name`
failedPublishesIdentifiers.push({ failedPublishesIdentifiers.push({