Skip to content

Commit 5e7274c

Browse files
committed
tokenRecommendation uuid
Signed-off-by: MarcoMandar <malicemandar@gmail.com>
1 parent 2d93baa commit 5e7274c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/plugin-solana/src/providers/trustScoreProvider.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
} from "@ai16z/plugin-trustdb";
2020
import { settings } from "@ai16z/eliza";
2121
import { IAgentRuntime, Memory, Provider, State } from "@ai16z/eliza";
22+
import { v4 as uuidv4 } from "uuid";
2223

2324
const Wallet = settings.MAIN_WALLET_ADDRESS;
2425
interface TradeData {
@@ -391,8 +392,10 @@ export class TrustScoreManager {
391392
rapidDump: false,
392393
};
393394
this.trustScoreDb.addTradePerformance(creationData, data.is_simulation);
394-
395+
// generate unique uuid for each TokenRecommendation
396+
const tokenUUId = uuidv4();
395397
const tokenRecommendation: TokenRecommendation = {
398+
id: tokenUUId,
396399
recommenderId: recommenderId,
397400
tokenAddress: tokenAddress,
398401
timestamp: new Date(),

0 commit comments

Comments
 (0)