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
cd314569
Commit
cd314569
authored
Sep 08, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use currentFile
parent
8e73be41
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
compiler-container.tsx
...remix-ui/solidity-compiler/src/lib/compiler-container.tsx
+3
-3
compileTabLogic.ts
...mix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts
+1
-1
No files found.
libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
View file @
cd314569
...
...
@@ -57,7 +57,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
_updateVersionSelector
(
selectedVersion
)
}
})
const
currentFileName
=
api
.
getAppParameter
(
'currentFile'
)
as
string
const
currentFileName
=
api
.
currentFile
currentFile
(
currentFileName
)
listenToEvents
(
compileTabLogic
,
api
)(
dispatch
)
...
...
@@ -229,7 +229,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
}
const
isSolFileSelected
=
(
currentFile
:
string
=
''
)
=>
{
if
(
!
currentFile
)
currentFile
=
api
.
getAppParameter
(
'currentFile'
)
as
string
if
(
!
currentFile
)
currentFile
=
api
.
currentFile
if
(
!
currentFile
)
return
false
const
extention
=
currentFile
.
substr
(
currentFile
.
length
-
3
,
currentFile
.
length
)
return
extention
.
toLowerCase
()
===
'sol'
||
extention
.
toLowerCase
()
===
'yul'
...
...
@@ -298,7 +298,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
}
const
compile
=
()
=>
{
const
currentFile
=
api
.
getAppParameter
(
'currentFile'
)
as
string
const
currentFile
=
api
.
currentFile
if
(
!
isSolFileSelected
())
return
...
...
libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts
View file @
cd314569
...
...
@@ -123,7 +123,7 @@ export class CompileTabLogic {
// TODO readd saving current file
this
.
api
.
saveCurrentFile
()
this
.
event
.
emit
(
'removeAnnotations'
)
var
currentFile
=
this
.
api
.
getAppParameter
(
'currentFile'
)
var
currentFile
=
this
.
api
.
currentFile
return
this
.
compileFile
(
currentFile
)
}
catch
(
err
)
{
console
.
error
(
err
)
...
...
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