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
da206579
Commit
da206579
authored
Jan 15, 2020
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use current provider for gas price
parent
a3c926c7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
1 deletion
+13
-1
blockchain.js
src/blockchain/blockchain.js
+1
-1
injected.js
src/blockchain/providers/injected.js
+4
-0
node.js
src/blockchain/providers/node.js
+4
-0
vm.js
src/blockchain/providers/vm.js
+4
-0
No files found.
src/blockchain/blockchain.js
View file @
da206579
...
...
@@ -132,7 +132,7 @@ class Blockchain {
}
determineGasPrice
(
cb
)
{
this
.
executionContext
.
web3
().
eth
.
getGasPrice
((
error
,
gasPrice
)
=>
{
this
.
getCurrentProvider
()
.
getGasPrice
((
error
,
gasPrice
)
=>
{
const
warnMessage
=
' Please fix this issue before sending any transaction. '
if
(
error
)
{
return
cb
(
'Unable to retrieve the current network gas price.'
+
warnMessage
+
error
)
...
...
src/blockchain/providers/injected.js
View file @
da206579
...
...
@@ -30,6 +30,10 @@ class InjectedProvider {
})
}
getGasPrice
(
cb
)
{
this
.
executionContext
.
web3
().
eth
.
getGasPrice
(
cb
)
}
signMessage
(
message
,
account
,
_passphrase
,
cb
)
{
const
hashedMsg
=
Web3
.
utils
.
sha3
(
message
)
try
{
...
...
src/blockchain/providers/node.js
View file @
da206579
...
...
@@ -38,6 +38,10 @@ class NodeProvider {
})
}
getGasPrice
(
cb
)
{
this
.
executionContext
.
web3
().
eth
.
getGasPrice
(
cb
)
}
signMessage
(
message
,
account
,
passphrase
,
cb
)
{
const
hashedMsg
=
Web3
.
utils
.
sha3
(
message
)
try
{
...
...
src/blockchain/providers/vm.js
View file @
da206579
...
...
@@ -72,6 +72,10 @@ class VMProvider {
})
}
getGasPrice
(
cb
)
{
this
.
executionContext
.
web3
().
eth
.
getGasPrice
(
cb
)
}
signMessage
(
message
,
account
,
_passphrase
,
cb
)
{
const
personalMsg
=
ethJSUtil
.
hashPersonalMessage
(
Buffer
.
from
(
message
))
const
privKey
=
this
.
providers
.
vm
.
accounts
[
account
].
privateKey
...
...
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