File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed
apps/remix-ide/src/app/files Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -15,4 +15,12 @@ export class FoundryHandle extends WebsocketPlugin {
1515 constructor ( ) {
1616 super ( profile )
1717 }
18+
19+ callPluginMethod ( key , payload = [ ] ) {
20+ if ( this . socket . readyState !== this . socket . OPEN ) {
21+ console . log ( `${ this . profile . name } connection is not opened.` )
22+ return false
23+ }
24+ return super . callPluginMethod ( key , payload )
25+ }
1826}
Original file line number Diff line number Diff line change @@ -15,4 +15,12 @@ export class HardhatHandle extends WebsocketPlugin {
1515 constructor ( ) {
1616 super ( profile )
1717 }
18+
19+ callPluginMethod ( key , payload = [ ] ) {
20+ if ( this . socket . readyState !== this . socket . OPEN ) {
21+ console . log ( `${ this . profile . name } connection is not opened.` )
22+ return false
23+ }
24+ return super . callPluginMethod ( key , payload )
25+ }
1826}
Original file line number Diff line number Diff line change @@ -12,7 +12,16 @@ const profile = {
1212}
1313
1414export class TruffleHandle extends WebsocketPlugin {
15- constructor ( ) {
15+ constructor ( ) {
1616 super ( profile )
1717 }
18+
19+ callPluginMethod ( key , payload = [ ] ) {
20+ if ( this . socket . readyState !== this . socket . OPEN ) {
21+ console . log ( `${ this . profile . name } connection is not opened.` )
22+ return false
23+ }
24+ return super . callPluginMethod ( key , payload )
25+ }
26+
1827}
You can’t perform that action at this time.
0 commit comments