Commit c6c93371 authored by Theerathat Pornprinya's avatar Theerathat Pornprinya

Final Archives

parent 8ddacb47
......@@ -65,6 +65,25 @@ App = {
})
},
buyTokens: function() {
$('#content').hide();
$('#loader').show();
var numberTokens = $('#numberOfTokens').val();
App.contracts.FilmChainTokenSales.deployed().then(function(instance) {
return instance.buyTokens(numberTokens, {
from: App.account,
value: numberTokens * App.tokenPrice,
gas: 600000
});
}).then(function(result) {
console.log("Tokens bought");
$('form').trigger('reset');
})
},
render: function() {
if (App.loading){
return;
......@@ -113,26 +132,9 @@ App = {
content.show();
})
})
},
buyTokens: function() {
$('#content').hide();
$('#loader').show();
var numberTokens = $('#numberOfTokens').val();
App.contracts.FilmChainTokenSales.deployed().then(function(instance) {
return instance.buyTokens(numberTokens, {
from: App.account,
value: numberTokens * App.tokenPrice,
gas: 600000
});
}).then(function(result) {
console.log("Tokens bought");
$('form').trigger('reset');
}
})
}
}
......
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