diff --git a/src/extension/panelControllers/invokeFilePanelController.ts b/src/extension/panelControllers/invokeFilePanelController.ts
index fe7a58f..048eb99 100644
--- a/src/extension/panelControllers/invokeFilePanelController.ts
+++ b/src/extension/panelControllers/invokeFilePanelController.ts
@@ -33,9 +33,11 @@ export default class InvokeFilePanelController extends PanelControllerBase<
view: "invokeFile",
panelTitle: "Invoke File Editor",
fileContents: [],
- contracts: {},
- nefHints: {},
- addressSuggestions: [],
+ autoCompleteData: {
+ contracts: {},
+ nefHints: {},
+ addressSuggestions: [],
+ },
errorText: "",
connectedTo: "",
connectionState: "none",
@@ -214,9 +216,11 @@ export default class InvokeFilePanelController extends PanelControllerBase<
this.updateViewState({
connectedTo: this.activeConnection.connection?.blockchainIdentifier.name,
connectionState,
- contracts,
- nefHints,
- addressSuggestions,
+ autoCompleteData: {
+ contracts,
+ nefHints,
+ addressSuggestions,
+ },
});
}
diff --git a/src/panel/views/InvokeFile.tsx b/src/panel/views/InvokeFile.tsx
index 17dbe63..56086d9 100644
--- a/src/panel/views/InvokeFile.tsx
+++ b/src/panel/views/InvokeFile.tsx
@@ -33,12 +33,14 @@ export default function InvokeFile({ viewState, postMessage }: Props) {
}}
>
postMessage({
@@ -67,8 +69,8 @@ export default function InvokeFile({ viewState, postMessage }: Props) {
))}
postMessage({
diff --git a/src/shared/autoCompleteData.ts b/src/shared/autoCompleteData.ts
new file mode 100644
index 0000000..cd45934
--- /dev/null
+++ b/src/shared/autoCompleteData.ts
@@ -0,0 +1,9 @@
+import { ContractManifestJson } from "@cityofzion/neon-core/lib/sc";
+
+type AutoCompleteData = {
+ contracts: { [hashOrNefFile: string]: ContractManifestJson };
+ nefHints: { [hash: string]: { [nefPath: string]: boolean } };
+ addressSuggestions: string[];
+};
+
+export default AutoCompleteData;
diff --git a/src/shared/viewState/invokeFileViewState.ts b/src/shared/viewState/invokeFileViewState.ts
index d434386..0a20466 100644
--- a/src/shared/viewState/invokeFileViewState.ts
+++ b/src/shared/viewState/invokeFileViewState.ts
@@ -1,4 +1,4 @@
-import { ContractManifestJson } from "@cityofzion/neon-core/lib/sc";
+import AutoCompleteData from "../autocompleteData";
type InvokeFileViewState = {
view: "invokeFile";
@@ -8,9 +8,7 @@ type InvokeFileViewState = {
operation?: string;
args?: (string | number)[];
}[];
- contracts: { [hashOrNefFile: string]: ContractManifestJson };
- nefHints: { [hash: string]: { [nefPath: string]: boolean } };
- addressSuggestions: string[];
+ autoCompleteData: AutoCompleteData;
errorText: string;
connectedTo: string;
connectionState: "ok" | "connecting" | "none";