|
|
|
@ -36,7 +36,7 @@ export interface RemixUiEditorContextViewProps { |
|
|
|
|
declarationOf: (node: astNode) => astNode |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function isDefinition (node: any) { |
|
|
|
|
function isDefinition(node: any) { |
|
|
|
|
return node.nodeType === 'ContractDefinition' || |
|
|
|
|
node.nodeType === 'FunctionDefinition' || |
|
|
|
|
node.nodeType === 'ModifierDefinition' || |
|
|
|
@ -45,11 +45,9 @@ function isDefinition (node: any) { |
|
|
|
|
node.nodeType === 'EventDefinition' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type nullableAstNode = astNode | null |
|
|
|
|
|
|
|
|
|
export function RemixUiEditorContextView (props: RemixUiEditorContextViewProps) { |
|
|
|
|
export function RemixUiEditorContextView(props: RemixUiEditorContextViewProps) { |
|
|
|
|
/* |
|
|
|
|
gotoLineDisableRef is used to temporarily disable the update of the view. |
|
|
|
|
e.g when the user ask the component to "gotoLine" we don't want to rerender the component (but just to put the mouse on the desired line) |
|
|
|
@ -90,7 +88,7 @@ export function RemixUiEditorContextView (props: RemixUiEditorContextViewProps) |
|
|
|
|
gasEstimation = await props.gasEstimation(currentNode) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
let activeHighlights = await props.getActiveHighlights() |
|
|
|
|
const activeHighlights = await props.getActiveHighlights() |
|
|
|
|
setState(prevState => { |
|
|
|
|
return { ...prevState, nodes, references, activeHighlights, currentNode, gasEstimation } |
|
|
|
|
}) |
|
|
|
|