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
445150f2
Unverified
Commit
445150f2
authored
Feb 04, 2020
by
yann300
Committed by
GitHub
Feb 04, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2573 from ethereum/fixTxOnMainnet
Fix some references in "getConfirmationCb"
parents
4a106bd9
8f6b6e8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
contractDropdown.js
src/app/tabs/runTab/contractDropdown.js
+3
-2
recorder.js
src/app/tabs/runTab/recorder.js
+3
-2
No files found.
src/app/tabs/runTab/contractDropdown.js
View file @
445150f2
...
...
@@ -205,17 +205,18 @@ class ContractDropdownUI {
}
getConfirmationCb
(
modalDialog
,
confirmDialog
)
{
// this code is the same as in recorder.js. TODO need to be refactored out
const
confirmationCb
=
(
network
,
tx
,
gasEstimation
,
continueTxExecution
,
cancelCb
)
=>
{
if
(
network
.
name
!==
'Main'
)
{
return
continueTxExecution
(
null
)
}
const
amount
=
this
.
blockchain
.
fromWei
(
tx
.
value
,
true
,
'ether'
)
const
content
=
confirmDialog
(
tx
,
amount
,
gasEstimation
,
null
,
this
.
blockchain
.
determineGasFees
(
tx
),
this
.
blockchain
.
determineGasPrice
)
const
content
=
confirmDialog
(
tx
,
amount
,
gasEstimation
,
null
,
this
.
blockchain
.
determineGasFees
(
tx
),
this
.
blockchain
.
determineGasPrice
.
bind
(
this
.
blockchain
)
)
modalDialog
(
'Confirm transaction'
,
content
,
{
label
:
'Confirm'
,
fn
:
()
=>
{
this
.
config
.
setUnpersistedProperty
(
'doNotShowTransactionConfirmationAgain'
,
content
.
querySelector
(
'input#confirmsetting'
).
checked
)
this
.
blockchain
.
udapp
.
config
.
setUnpersistedProperty
(
'doNotShowTransactionConfirmationAgain'
,
content
.
querySelector
(
'input#confirmsetting'
).
checked
)
// TODO: check if this is check is still valid given the refactor
if
(
!
content
.
gasPriceStatus
)
{
cancelCb
(
'Given gas price is not correct'
)
...
...
src/app/tabs/runTab/recorder.js
View file @
445150f2
...
...
@@ -78,17 +78,18 @@ class RecorderUI {
}
getConfirmationCb
(
modalDialog
,
confirmDialog
)
{
// this code is the same as in contractDropdown.js. TODO need to be refactored out
const
confirmationCb
=
(
network
,
tx
,
gasEstimation
,
continueTxExecution
,
cancelCb
)
=>
{
if
(
network
.
name
!==
'Main'
)
{
return
continueTxExecution
(
null
)
}
const
amount
=
this
.
blockchain
.
fromWei
(
tx
.
value
,
true
,
'ether'
)
const
content
=
confirmDialog
(
tx
,
amount
,
gasEstimation
,
null
,
this
.
blockchain
.
determineGasFees
(
tx
),
this
.
blockchain
.
determineGasPrice
)
const
content
=
confirmDialog
(
tx
,
amount
,
gasEstimation
,
null
,
this
.
blockchain
.
determineGasFees
(
tx
),
this
.
blockchain
.
determineGasPrice
.
bind
(
this
.
blockchain
)
)
modalDialog
(
'Confirm transaction'
,
content
,
{
label
:
'Confirm'
,
fn
:
()
=>
{
this
.
config
.
setUnpersistedProperty
(
'doNotShowTransactionConfirmationAgain'
,
content
.
querySelector
(
'input#confirmsetting'
).
checked
)
this
.
blockchain
.
udapp
.
config
.
setUnpersistedProperty
(
'doNotShowTransactionConfirmationAgain'
,
content
.
querySelector
(
'input#confirmsetting'
).
checked
)
// TODO: check if this is check is still valid given the refactor
if
(
!
content
.
gasPriceStatus
)
{
cancelCb
(
'Given gas price is not correct'
)
...
...
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