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
85327645
Commit
85327645
authored
Jan 03, 2018
by
ninabreznik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move modal dialog for Injected Web3
parent
515e49e4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
txRunner.js
src/app/execution/txRunner.js
+6
-7
No files found.
src/app/execution/txRunner.js
View file @
85327645
...
@@ -68,9 +68,6 @@ TxRunner.prototype.execute = function (args, callback) {
...
@@ -68,9 +68,6 @@ TxRunner.prototype.execute = function (args, callback) {
})
})
}})
}})
}
else
{
}
else
{
modalDialog
(
'Confirm transaction'
,
remixdDialog
(
tx
),
{
label
:
'Confirm'
,
fn
:
()
=>
{
executionContext
.
web3
().
eth
.
estimateGas
(
tx
,
function
(
err
,
gasEstimation
)
{
executionContext
.
web3
().
eth
.
estimateGas
(
tx
,
function
(
err
,
gasEstimation
)
{
if
(
err
)
{
if
(
err
)
{
return
callback
(
err
,
gasEstimation
)
return
callback
(
err
,
gasEstimation
)
...
@@ -88,6 +85,9 @@ TxRunner.prototype.execute = function (args, callback) {
...
@@ -88,6 +85,9 @@ TxRunner.prototype.execute = function (args, callback) {
}
}
tx
.
gas
=
gasEstimation
tx
.
gas
=
gasEstimation
modalDialog
(
'Confirm transaction'
,
remixdDialog
(
tx
),
{
label
:
'Confirm'
,
fn
:
()
=>
{
var
sendTransaction
=
self
.
personalMode
?
executionContext
.
web3
().
personal
.
sendTransaction
:
executionContext
.
web3
().
eth
.
sendTransaction
var
sendTransaction
=
self
.
personalMode
?
executionContext
.
web3
().
personal
.
sendTransaction
:
executionContext
.
web3
().
eth
.
sendTransaction
try
{
try
{
sendTransaction
(
tx
,
function
(
err
,
resp
)
{
sendTransaction
(
tx
,
function
(
err
,
resp
)
{
...
@@ -100,8 +100,8 @@ TxRunner.prototype.execute = function (args, callback) {
...
@@ -100,8 +100,8 @@ TxRunner.prototype.execute = function (args, callback) {
}
catch
(
e
)
{
}
catch
(
e
)
{
return
callback
(
`Send transaction failed:
${
e
.
message
}
. if you use an injected provider, please check it is properly unlocked. `
)
return
callback
(
`Send transaction failed:
${
e
.
message
}
. if you use an injected provider, please check it is properly unlocked. `
)
}
}
})
}})
}})
})
}
}
}
else
{
}
else
{
try
{
try
{
...
@@ -188,13 +188,12 @@ function run (self, tx, stamp, callback) {
...
@@ -188,13 +188,12 @@ function run (self, tx, stamp, callback) {
function
remixdDialog
(
tx
)
{
function
remixdDialog
(
tx
)
{
return
yo
`
return
yo
`
<div>
<div>
<div>You are trying to execute transaction on the main network.
Please, click confirm
to continue!</div>
<div>You are trying to execute transaction on the main network.
Click confirm if you want
to continue!</div>
<div class=
${
css
.
txInfoBox
}
>
<div class=
${
css
.
txInfoBox
}
>
<div>from:
${
tx
.
from
}
</div>
<div>from:
${
tx
.
from
}
</div>
<div>to:
${
tx
.
from
}
</div>
<div>to:
${
tx
.
from
}
</div>
<div>tx value:
${
tx
.
value
}
</div>
<div>tx value:
${
tx
.
value
}
</div>
<div>gas limit:
${
tx
.
gasLimit
}
</div>
<div>gas limit:
${
tx
.
gas
}
</div>
<div>gas price:
${
tx
.
gasEstimation
}
</div>
<div>data:
${
helper
.
shortenHexData
(
tx
.
data
)}
</div>
<div>data:
${
helper
.
shortenHexData
(
tx
.
data
)}
</div>
</div>
</div>
</div>
</div>
...
...
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