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
43b756ab
Unverified
Commit
43b756ab
authored
Feb 04, 2020
by
yann300
Committed by
GitHub
Feb 04, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2577 from ethereum/mainnet-fix
function call fixed
parents
445150f2
dd667a7d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
sendTxCallbacks.js
src/app/ui/sendTxCallbacks.js
+7
-7
universal-dapp-ui.js
src/app/ui/universal-dapp-ui.js
+2
-2
No files found.
src/app/ui/sendTxCallbacks.js
View file @
43b756ab
...
@@ -7,18 +7,18 @@ const typeConversion = remixLib.execution.typeConversion
...
@@ -7,18 +7,18 @@ const typeConversion = remixLib.execution.typeConversion
const
Web3
=
require
(
'web3'
)
const
Web3
=
require
(
'web3'
)
module
.
exports
=
{
module
.
exports
=
{
getCallBacksWithContext
:
(
udapp
,
executionContext
)
=>
{
getCallBacksWithContext
:
(
udapp
UI
,
executionContext
)
=>
{
let
callbacks
=
{}
let
callbacks
=
{}
callbacks
.
confirmationCb
=
confirmationCb
callbacks
.
confirmationCb
=
confirmationCb
callbacks
.
continueCb
=
continueCb
callbacks
.
continueCb
=
continueCb
callbacks
.
promptCb
=
promptCb
callbacks
.
promptCb
=
promptCb
callbacks
.
udapp
=
udapp
callbacks
.
udapp
UI
=
udappUI
callbacks
.
executionContext
=
executionContext
callbacks
.
executionContext
=
executionContext
return
callbacks
return
callbacks
}
}
}
}
const
continueCb
=
(
error
,
continueTxExecution
,
cancelCb
)
=>
{
const
continueCb
=
function
(
error
,
continueTxExecution
,
cancelCb
)
{
if
(
error
)
{
if
(
error
)
{
const
msg
=
typeof
error
!==
'string'
?
error
.
message
:
error
const
msg
=
typeof
error
!==
'string'
?
error
.
message
:
error
modalDialog
(
modalDialog
(
...
@@ -41,17 +41,17 @@ const continueCb = (error, continueTxExecution, cancelCb) => {
...
@@ -41,17 +41,17 @@ const continueCb = (error, continueTxExecution, cancelCb) => {
}
}
}
}
const
promptCb
=
(
okCb
,
cancelCb
)
=>
{
const
promptCb
=
function
(
okCb
,
cancelCb
)
{
modalCustom
.
promptPassphrase
(
'Passphrase requested'
,
'Personal mode is enabled. Please provide passphrase of account'
,
''
,
okCb
,
cancelCb
)
modalCustom
.
promptPassphrase
(
'Passphrase requested'
,
'Personal mode is enabled. Please provide passphrase of account'
,
''
,
okCb
,
cancelCb
)
}
}
const
confirmationCb
=
(
network
,
tx
,
gasEstimation
,
continueTxExecution
,
cancelCb
)
=>
{
const
confirmationCb
=
function
(
network
,
tx
,
gasEstimation
,
continueTxExecution
,
cancelCb
)
{
let
self
=
this
let
self
=
this
if
(
network
.
name
!==
'Main'
)
{
if
(
network
.
name
!==
'Main'
)
{
return
continueTxExecution
(
null
)
return
continueTxExecution
(
null
)
}
}
var
amount
=
Web3
.
utils
.
fromWei
(
typeConversion
.
toInt
(
tx
.
value
),
'ether'
)
var
amount
=
Web3
.
utils
.
fromWei
(
typeConversion
.
toInt
(
tx
.
value
),
'ether'
)
var
content
=
confirmDialog
(
tx
,
amount
,
gasEstimation
,
self
.
udapp
,
var
content
=
confirmDialog
(
tx
,
amount
,
gasEstimation
,
self
.
udapp
UI
,
(
gasPrice
,
cb
)
=>
{
(
gasPrice
,
cb
)
=>
{
let
txFeeText
,
priceStatus
let
txFeeText
,
priceStatus
// TODO: this try catch feels like an anti pattern, can/should be
// TODO: this try catch feels like an anti pattern, can/should be
...
@@ -86,7 +86,7 @@ const confirmationCb = (network, tx, gasEstimation, continueTxExecution, cancelC
...
@@ -86,7 +86,7 @@ const confirmationCb = (network, tx, gasEstimation, continueTxExecution, cancelC
content
,
content
,
{
label
:
'Confirm'
,
{
label
:
'Confirm'
,
fn
:
()
=>
{
fn
:
()
=>
{
self
.
udapp
.
config
.
setUnpersistedProperty
(
self
.
udapp
UI
.
udapp
.
config
.
setUnpersistedProperty
(
'doNotShowTransactionConfirmationAgain'
,
'doNotShowTransactionConfirmationAgain'
,
content
.
querySelector
(
'input#confirmsetting'
).
checked
content
.
querySelector
(
'input#confirmsetting'
).
checked
)
)
...
...
src/app/ui/universal-dapp-ui.js
View file @
43b756ab
...
@@ -253,7 +253,7 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i
...
@@ -253,7 +253,7 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i
self
.
logCallback
(
`
${
logMsg
}
`
)
self
.
logCallback
(
`
${
logMsg
}
`
)
}
}
if
(
args
.
funABI
.
type
===
'fallback'
)
data
.
dataHex
=
value
if
(
args
.
funABI
.
type
===
'fallback'
)
data
.
dataHex
=
value
self
.
udapp
.
callFunction
(
args
.
address
,
data
,
args
.
funABI
,
callbacksInContext
.
confirmationCb
,
callbacksInContext
.
continueCb
,
callbacksInContext
.
promptCb
,
(
error
,
txResult
)
=>
{
self
.
udapp
.
callFunction
(
args
.
address
,
data
,
args
.
funABI
,
callbacksInContext
.
confirmationCb
.
bind
(
callbacksInContext
),
callbacksInContext
.
continueCb
.
bind
(
callbacksInContext
),
callbacksInContext
.
promptCb
.
bind
(
callbacksInContext
)
,
(
error
,
txResult
)
=>
{
if
(
!
error
)
{
if
(
!
error
)
{
var
isVM
=
self
.
executionContext
.
isVM
()
var
isVM
=
self
.
executionContext
.
isVM
()
if
(
isVM
)
{
if
(
isVM
)
{
...
@@ -278,7 +278,7 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i
...
@@ -278,7 +278,7 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i
self
.
logCallback
(
msg
)
self
.
logCallback
(
msg
)
},
(
data
,
runTxCallback
)
=>
{
},
(
data
,
runTxCallback
)
=>
{
// called for libraries deployment
// called for libraries deployment
self
.
udapp
.
runTx
(
data
,
callbacksInContext
.
confirmationCb
,
runTxCallback
)
self
.
udapp
.
runTx
(
data
,
callbacksInContext
.
confirmationCb
.
bind
(
callbacksInContext
)
,
runTxCallback
)
})
})
}
}
...
...
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