update label

pull/5370/head
yann300 3 years ago
parent 0e359a586a
commit 508812d35b
  1. 6
      apps/remix-ide-e2e/src/tests/publishContract.test.ts
  2. 8
      libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx

@ -25,7 +25,7 @@ module.exports = {
const value = <string>(result.value)
browser.perform((done) => {
if (value.indexOf('Metadata of "ballot" was published successfully.') === -1) browser.assert.fail('ipfs deploy failed')
if (value.indexOf('Metadata and sources of "ballot" were published successfully.') === -1) browser.assert.fail('ipfs deploy failed')
done()
})
})
@ -43,7 +43,7 @@ module.exports = {
const value = <string>(result.value)
browser.perform((done) => {
if (value.indexOf('Metadata of "ballot" was published successfully.') === -1) browser.assert.fail('swarm deploy failed')
if (value.indexOf('Metadata and sources of "ballot" were published successfully.') === -1) browser.assert.fail('swarm deploy failed')
if (value.indexOf('bzz') === -1) browser.assert.fail('swarm deploy failed')
done()
})
@ -67,7 +67,7 @@ module.exports = {
.getText('[data-id="udappModalDialogModalBody-react"]', (result) => {
const value = typeof result.value === 'string' ? result.value : null
if (value.indexOf('Metadata of "storage" was published successfully.') === -1) browser.assert.fail('ipfs deploy failed')
if (value.indexOf('Metadata and sources of "storage" were published successfully.') === -1) browser.assert.fail('ipfs deploy failed')
})
.modalFooterOKClick('udapp')
},

@ -28,7 +28,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => {
try {
const result = await publishToSwarm(contract, api)
modal(`Published ${contract.name}'s Metadata`, publishMessage(result.uploaded))
modal(`Published ${contract.name}'s Metadata and Sources`, publishMessage(result.uploaded))
} catch (err) {
let parseError = err
try {
@ -41,7 +41,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => {
try {
const result = await publishToIPFS(contract, api)
modal(`Published ${contract.name}'s Metadata`, publishMessage(result.uploaded))
modal(`Published ${contract.name}'s Metadata and Sources`, publishMessage(result.uploaded))
} catch (err) {
modal('IPFS Publish Failed', publishMessageFailed(storage, err))
}
@ -55,7 +55,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => {
}, [storage])
const publishMessage = (uploaded) => (
<span> Metadata of "{contract.name.toLowerCase()}" was published successfully. <br />
<span> Metadata and sources of "{contract.name.toLowerCase()}" were published successfully. <br />
<pre>
<div>
{ uploaded.map((value, index) => <div key={index}><b>{ value.filename }</b> : <pre>{ value.output.url }</pre></div>) }
@ -65,7 +65,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => {
)
const publishMessageFailed = (storage, err) => (
<span>Failed to publish metadata file to { storage }, please check the { storage } gateways is available. <br />
<span>Failed to publish metadata file and sources to { storage }, please check the { storage } gateways is available. <br />
{err}
</span>
)

Loading…
Cancel
Save