Skip to content

Commit 2d93baa

Browse files
committed
trustscore updates
Signed-off-by: MarcoMandar <malicemandar@gmail.com>
1 parent 5877e42 commit 2d93baa

File tree

2 files changed

+303
-92
lines changed

2 files changed

+303
-92
lines changed

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

+6-3
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ export class TrustScoreManager {
153153
rapidDump: isRapidDump,
154154
suspiciousVolume: suspiciousVolume,
155155
validationTrust: validationTrustScore,
156+
balance: balance,
157+
initialMarketCap:
158+
processedData.dexScreenerData.pairs[0]?.marketCap || 0,
156159
lastUpdated: new Date(),
157160
},
158161
recommenderMetrics: {
@@ -396,7 +399,7 @@ export class TrustScoreManager {
396399
initialMarketCap:
397400
processedData.dexScreenerData.pairs[0]?.marketCap || 0,
398401
initialLiquidity:
399-
processedData.dexScreenerData.pairs[0]?.liquidity || 0,
402+
processedData.dexScreenerData.pairs[0]?.liquidity?.usd || 0,
400403
initialPrice: processedData.tradeData.price,
401404
};
402405
this.trustScoreDb.addTokenRecommendation(tokenRecommendation);
@@ -431,7 +434,7 @@ export class TrustScoreManager {
431434
const hash = Math.random().toString(36).substring(7);
432435
const transaction = {
433436
tokenAddress: tokenAddress,
434-
type: "buy",
437+
type: "buy" as "buy" | "sell",
435438
transactionHash: hash,
436439
amount: data.buy_amount,
437440
price: processedData.tradeData.price,
@@ -575,7 +578,7 @@ export class TrustScoreManager {
575578
const hash = Math.random().toString(36).substring(7);
576579
const transaction = {
577580
tokenAddress: tokenAddress,
578-
type: "sell",
581+
type: "sell" as "buy" | "sell",
579582
transactionHash: hash,
580583
amount: sellDetails.sell_amount,
581584
price: processedData.tradeData.price,

0 commit comments

Comments
 (0)