Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Theerathat Pornprinya
FilmChain Marketplace
Commits
c6c93371
Commit
c6c93371
authored
Jun 25, 2020
by
Theerathat Pornprinya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Final Archives
parent
8ddacb47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
18 deletions
+20
-18
filmchain_token_sale/src/js/app.js
filmchain_token_sale/src/js/app.js
+20
-18
No files found.
filmchain_token_sale/src/js/app.js
View file @
c6c93371
...
...
@@ -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
'
);
}
})
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment