@clonegod/ttd-sui-common 1.0.76 → 1.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -35,7 +35,7 @@ export declare abstract class AbstractSuiDexTradePlus extends AbastrcatTrade {
|
|
|
35
35
|
protected getObjectInfo(objectId: string): Promise<PoolObjectInfo | null>;
|
|
36
36
|
protected compareBigIntBalance(a: any, b: any): number;
|
|
37
37
|
protected mergeTokenObjects(tx: Transaction, primaryCoin: any, objectsToMerge: any[], tokenSymbol: string): void;
|
|
38
|
-
protected try_refresh_wallet_objects(wallet: string, txid: string, try_times?: number, try_delay_ms?: number): void;
|
|
38
|
+
protected try_refresh_wallet_objects(wallet: string, txid: string, context: TradeContext, try_times?: number, try_delay_ms?: number): void;
|
|
39
39
|
abstract execute(context: TradeContext, retryCount?: number): Promise<string>;
|
|
40
40
|
protected abstract initConfigs(): Promise<void>;
|
|
41
41
|
}
|
|
@@ -316,12 +316,13 @@ class AbstractSuiDexTradePlus extends dist_1.AbastrcatTrade {
|
|
|
316
316
|
tx.mergeCoins(primaryCoin, other_objects);
|
|
317
317
|
(0, dist_1.log_info)(`✅ ${tokenSymbol} 进行对象合并,涉及 ${other_objects.length} 个对象`);
|
|
318
318
|
}
|
|
319
|
-
try_refresh_wallet_objects(wallet, txid, try_times = 2, try_delay_ms = 300) {
|
|
319
|
+
try_refresh_wallet_objects(wallet, txid, context, try_times = 2, try_delay_ms = 300) {
|
|
320
320
|
setTimeout(() => {
|
|
321
321
|
for (let i = 1; i <= try_times; i++) {
|
|
322
322
|
setTimeout(() => {
|
|
323
323
|
let group_id = this.appConfig.trade_runtime.group.id;
|
|
324
|
-
|
|
324
|
+
let coin_types = [context.pool_info.tokenA.address, context.pool_info.tokenB.address];
|
|
325
|
+
this.appConfig.arb_cache.redis_event_publisher.publish_wallet_raw_tx_event(group_id, wallet, { group_id, wallet, txid, coin_types, remark: `PRE_REFRESH_OBJECTS_${i}` });
|
|
325
326
|
}, i * try_delay_ms);
|
|
326
327
|
}
|
|
327
328
|
}, 0);
|