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
18914407
Commit
18914407
authored
Jan 21, 2021
by
lianahus
Committed by
Liana Husikyan
Jan 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check for valid tx hash
parent
aa5d097e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
5 deletions
+19
-5
debugger-api.ts
apps/debugger/src/app/debugger-api.ts
+0
-0
debugger-tab.js
apps/remix-ide/src/app/tabs/debugger-tab.js
+1
-1
helper.js
apps/remix-ide/src/lib/helper.js
+4
-0
debugger-ui.tsx
libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx
+14
-4
No files found.
apps/debugger/src/app/debugger-api.ts
View file @
18914407
apps/remix-ide/src/app/tabs/debugger-tab.js
View file @
18914407
...
...
@@ -6,9 +6,9 @@ import * as packageJson from '../../../../../package.json'
import
React
from
'react'
// eslint-disable-line
import
ReactDOM
from
'react-dom'
import
modalDialogCustom
from
'../ui/modal-dialog-custom'
import
bleach
from
'../../lib/bleach'
const
yo
=
require
(
'yo-yo'
)
const
css
=
require
(
'./styles/debugger-tab-styles'
)
import
bleach
from
'../../lib/bleach'
const
profile
=
{
name
:
'debugger'
,
...
...
apps/remix-ide/src/lib/helper.js
View file @
18914407
...
...
@@ -64,6 +64,10 @@ module.exports = {
isNumeric
(
value
)
{
return
/^
\+?(
0|
[
1-9
]\d
*
)
$/
.
test
(
value
)
},
isValidHash
(
hash
)
{
// 0x prefixed, hexadecimal, 64digit
const
hexValue
=
hash
.
slice
(
2
,
hash
.
length
)
return
this
.
is0XPrefixed
(
hash
)
&&
/^
[
0-9a-fA-F
]{64}
$/
.
test
(
hexValue
)
},
find
:
find
}
...
...
libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx
View file @
18914407
...
...
@@ -8,6 +8,7 @@ import { DebuggerUIProps } from './idebugger-api' // eslint-disable-line
import
{
Toaster
}
from
'@remix-ui/toaster'
// eslint-disable-line
/* eslint-disable-next-line */
import
'./debugger-ui.css'
const
helper
=
require
(
'../../../../../apps/remix-ide/src/lib/helper'
)
export
const
DebuggerUI
=
(
props
:
DebuggerUIProps
)
=>
{
const
debuggerModule
=
props
.
debuggerAPI
...
...
@@ -26,7 +27,6 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
debugWithGeneratedSources
:
false
},
toastMessage
:
''
,
currentDebugTransaction
:
''
,
validationError
:
''
,
txNumberIsEmpty
:
true
})
...
...
@@ -144,7 +144,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
vmDebuggerHead
:
false
},
debugging
:
false
,
currentDebugTransaction
:
''
txNumber
:
''
}
})
}
...
...
@@ -154,9 +154,19 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
setState
(
prevState
=>
{
return
{
...
prevState
,
currentDebugTransaction
:
txNumber
txNumber
:
txNumber
}
})
if
(
!
helper
.
isValidHash
(
txNumber
))
{
setState
(
prevState
=>
{
return
{
...
prevState
,
validationError
:
'Invalid transaction hash.'
}
})
return
}
const
web3
=
await
debuggerModule
.
getDebugWeb3
()
let
currentReceipt
try
{
...
...
@@ -186,6 +196,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
},
debugWithGeneratedSources
:
state
.
opt
.
debugWithGeneratedSources
})
debuggerInstance
.
debug
(
blockNumber
,
txNumber
,
tx
,
()
=>
{
listenToEvents
(
debuggerInstance
,
currentReceipt
)
setState
(
prevState
=>
{
...
...
@@ -210,7 +221,6 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
validationError
:
message
}
})
console
.
log
(
message
)
}
unLoad
()
})
...
...
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