@clonegod/ttd-sol-common 1.0.154 → 1.0.156
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.
|
@@ -17,5 +17,6 @@ export declare class AppConfig extends EventEmitter {
|
|
|
17
17
|
init_trade_runtime(): Promise<void>;
|
|
18
18
|
subscribe_config_change(): Promise<void>;
|
|
19
19
|
subscribe_order_event(trade_instance: AbastrcatTrade): Promise<void>;
|
|
20
|
+
subscribe_wallet_raw_txn_event(): Promise<void>;
|
|
20
21
|
cache_trade_result(trade_response: TradeResponseType): Promise<void>;
|
|
21
22
|
}
|
|
@@ -90,6 +90,21 @@ class AppConfig extends events_1.EventEmitter {
|
|
|
90
90
|
(0, dist_1.log_info)(`subscribe_order_event, success`, { dex_id, group_id, pair_name });
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
+
subscribe_wallet_raw_txn_event() {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
let handler = (txid, tx_data) => {
|
|
96
|
+
console.log('subscribe_wallet_raw_txn_event, recv tx data:');
|
|
97
|
+
console.log({
|
|
98
|
+
txid,
|
|
99
|
+
tx_data
|
|
100
|
+
});
|
|
101
|
+
this.emit(common_1.LOCAL_EVENT_NAME.EVENT_WALLET_TRANSACTION + '#' + txid, tx_data);
|
|
102
|
+
};
|
|
103
|
+
let group_id = this.trade_runtime.group.id;
|
|
104
|
+
yield this.arb_event_subscriber.subscribe_wallet_raw_tx_result(group_id, '', handler);
|
|
105
|
+
(0, dist_1.log_info)(`subscribe_wallet_raw_txn_event, success! group_id=${group_id}`);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
93
108
|
cache_trade_result(trade_response) {
|
|
94
109
|
return __awaiter(this, void 0, void 0, function* () {
|
|
95
110
|
try {
|
|
@@ -96,6 +96,7 @@ const handle_order_message = (appConfig, trade, message) => __awaiter(void 0, vo
|
|
|
96
96
|
};
|
|
97
97
|
global.event_emitter = appConfig;
|
|
98
98
|
new tx_result_check_1.TransactionResultChecker(env_args, appConfig, context, txid).init_tx_status().check();
|
|
99
|
+
appConfig.subscribe_wallet_raw_txn_event();
|
|
99
100
|
}
|
|
100
101
|
catch (err) {
|
|
101
102
|
(0, dist_1.log_error)(`handle_order_message error!`, err);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clonegod/ttd-sol-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.156",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"push": "npm run build && npm publish"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@clonegod/ttd-common": "1.1.
|
|
16
|
+
"@clonegod/ttd-common": "1.1.6",
|
|
17
17
|
"@metaplex-foundation/mpl-token-metadata": "^2.5.2",
|
|
18
18
|
"@solana/web3.js": "1.91.6",
|
|
19
19
|
"rpc-websockets": "7.10.0",
|