Commit d978e2ae authored by Alex Beregszaszi's avatar Alex Beregszaszi

Publish metadata on Swarm

parent c8345717
......@@ -647,7 +647,13 @@ var run = function () {
udapp.event.register('publishContract', this, function (contract) {
console.log('Publish contract...', contract)
alert('Publishing a contract is not supported yet.')
swarmgw.put(contract.metadata, function (err, ret) {
if (err) {
alert('Failed to publish metadata: ' + err)
} else {
alert('Published metadata: ' + ret)
}
})
})
// ----------------- Renderer -----------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment