Skip to content

Commit

Permalink
Merge pull request #3016 from AIFlowML/fix-plugin-goplus
Browse files Browse the repository at this point in the history
fix(lint): plugin-goplus
  • Loading branch information
tcm390 authored Jan 30, 2025
2 parents b3a15f1 + 641e83d commit 37c812c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 2 additions & 4 deletions packages/plugin-goplus/src/lib/GoPlusManage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


export const GoPlusType = {
EVMTOKEN_SECURITY_CHECK: "EVMTOKEN_SECURITY_CHECK",
SOLTOKEN_SECURITY_CHECK: "SOLTOKEN_SECURITY_CHECK",
Expand All @@ -15,10 +13,10 @@ export const GoPlusType = {
URL_SECURITY_CHECK: "URL_SECURITY_CHECK",
} as const;

export type GoPlusTypeType = (typeof GoPlusTypeEnum)[keyof typeof GoPlusType];
export type GoPlusTypeType = (typeof GoPlusType)[keyof typeof GoPlusType];

export type GoPlusParamType = {
"type": GoPlusType,
"type": (typeof GoPlusType)[keyof typeof GoPlusType],
"network"?: string,
"token"?: string,
"contract"?: string,
Expand Down
5 changes: 4 additions & 1 deletion packages/plugin-goplus/src/services/GoplusSecurityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { type IAgentRuntime, ModelClass, Service, ServiceType, elizaLogger, gene
import { GoPlusManage, type GoPlusParamType, GoPlusType } from "../lib/GoPlusManage";
import { requestPrompt, responsePrompt } from "../templates";

// Add type for check result
type GoPlusCheckResult = Record<string, unknown>;

export interface IGoplusSecurityService extends Service {
check(text: string): Promise<string>;
}
Expand Down Expand Up @@ -38,7 +41,7 @@ export class GoplusSecurityService extends Service implements IGoplusSecuritySer
elizaLogger.log("check generateObjectDeprecated text", obj);

const goPlusManage = new GoPlusManage(this.apiKey)
let checkResult: any;
let checkResult: GoPlusCheckResult;
switch(obj.type) {
case GoPlusType.EVMTOKEN_SECURITY_CHECK:
checkResult = await goPlusManage.tokenSecurity(obj.network, obj.token);
Expand Down

0 comments on commit 37c812c

Please sign in to comment.