Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
9c274fca
Commit
9c274fca
authored
Apr 12, 2016
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support Ethereum units for setting the value on a transaction
parent
00c0d3f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
app.js
assets/js/app.js
+4
-1
universal-dapp.js
assets/js/universal-dapp.js
+9
-1
index.html
index.html
+1
-1
No files found.
assets/js/app.js
View file @
9c274fca
...
@@ -672,7 +672,10 @@
...
@@ -672,7 +672,10 @@
vm
:
executionContext
===
'vm'
,
vm
:
executionContext
===
'vm'
,
removable
:
false
,
removable
:
false
,
getAddress
:
function
(){
return
$
(
'#txorigin'
).
val
();
},
getAddress
:
function
(){
return
$
(
'#txorigin'
).
val
();
},
getValue
:
function
(){
return
$
(
'#value'
).
val
();
},
getValue
:
function
(){
var
comp
=
$
(
'#value'
).
val
().
split
(
' '
);
return
web3
.
toWei
(
comp
[
0
],
comp
.
slice
(
1
).
join
(
' '
));
},
removable_instances
:
true
,
removable_instances
:
true
,
renderOutputModifier
:
function
(
contractName
,
$contractOutput
)
{
renderOutputModifier
:
function
(
contractName
,
$contractOutput
)
{
var
contract
=
data
.
contracts
[
contractName
];
var
contract
=
data
.
contracts
[
contractName
];
...
...
assets/js/universal-dapp.js
View file @
9c274fca
...
@@ -431,7 +431,15 @@ UniversalDApp.prototype.runTx = function( data, args, cb) {
...
@@ -431,7 +431,15 @@ UniversalDApp.prototype.runTx = function( data, args, cb) {
data
=
'0x'
+
data
;
data
=
'0x'
+
data
;
var
gas
=
self
.
options
.
getGas
?
self
.
options
.
getGas
:
1000000
;
var
gas
=
self
.
options
.
getGas
?
self
.
options
.
getGas
:
1000000
;
var
value
=
self
.
options
.
getValue
?
self
.
options
.
getValue
()
:
0
;
var
value
=
0
;
if
(
self
.
options
.
getValue
)
{
try
{
value
=
self
.
options
.
getValue
();
}
catch
(
e
)
{
return
cb
(
e
);
}
}
if
(
!
this
.
vm
)
{
if
(
!
this
.
vm
)
{
var
tx
=
{
var
tx
=
{
...
...
index.html
View file @
9c274fca
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
<label
for=
"gasPrice"
><input
type=
"number"
id=
"gasPrice"
value=
"0"
>
Gas Price
</label>
<label
for=
"gasPrice"
><input
type=
"number"
id=
"gasPrice"
value=
"0"
>
Gas Price
</label>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<label
for=
"value"
><input
type=
"
number"
id=
"value"
value=
"0"
>
Value (Wei)
</label>
<label
for=
"value"
><input
type=
"
text"
id=
"value"
value=
"0"
>
Value
</label>
</div>
</div>
</div>
</div>
<div
id=
"settingsView"
>
<div
id=
"settingsView"
>
...
...
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