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
b645d458
Commit
b645d458
authored
Jun 29, 2021
by
yann300
Committed by
Aniket
Jun 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
label & comment
parent
45db3361
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
hardhat-provider.js
apps/remix-ide/src/app/tabs/hardhat-provider.js
+3
-3
No files found.
apps/remix-ide/src/app/tabs/hardhat-provider.js
View file @
b645d458
...
...
@@ -43,7 +43,7 @@ export default class HardhatProvider extends Plugin {
sendAsync
(
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
this
.
blocked
)
return
reject
(
new
Error
(
'provider
temporarily blocked
'
))
if
(
this
.
blocked
)
return
reject
(
new
Error
(
'provider
unable to connect
'
))
// If provider is not set, allow to open modal only when provider is trying to connect
if
(
!
this
.
provider
)
{
modalDialogCustom
.
prompt
(
'Hardhat node request'
,
this
.
hardhatProviderDialogBody
(),
'http://127.0.0.1:8545'
,
(
target
)
=>
{
...
...
@@ -66,10 +66,10 @@ export default class HardhatProvider extends Plugin {
this
.
provider
[
this
.
provider
.
sendAsync
?
'sendAsync'
:
'send'
](
data
,
async
(
error
,
message
)
=>
{
if
(
error
)
{
this
.
blocked
=
true
modalDialogCustom
.
alert
(
'Hardhat'
,
`Error while connecting to the hardhat provider:
${
error
.
message
}
`
)
modalDialogCustom
.
alert
(
'Hardhat
Provider
'
,
`Error while connecting to the hardhat provider:
${
error
.
message
}
`
)
await
this
.
call
(
'udapp'
,
'setEnvironmentMode'
,
'vm'
)
this
.
provider
=
null
setTimeout
(
_
=>
{
this
.
blocked
=
false
},
1000
)
setTimeout
(
_
=>
{
this
.
blocked
=
false
},
1000
)
// we wait 1 second for letting remix to switch to vm
return
reject
(
error
)
}
resolve
(
message
)
...
...
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