@clonegod/ttd-sol-common 1.0.94 → 1.0.96
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.
|
@@ -27,14 +27,17 @@ const subscribe_wallet_transaction_txid = (geyser_ws_url, wallet_address, signat
|
|
|
27
27
|
}
|
|
28
28
|
var ws_client = new ws_1.default(geyser_ws_url);
|
|
29
29
|
function subscribe_transaction_by_txid() {
|
|
30
|
-
(0, dist_1.log_info)(`subscribe_transaction_by_txid`,
|
|
30
|
+
(0, dist_1.log_info)(`subscribe_transaction_by_txid`, {
|
|
31
|
+
wallet_address,
|
|
32
|
+
signature
|
|
33
|
+
});
|
|
31
34
|
const request = {
|
|
32
35
|
jsonrpc: '2.0',
|
|
33
36
|
id: 420,
|
|
34
37
|
method: 'transactionSubscribe',
|
|
35
38
|
params: [
|
|
36
39
|
{
|
|
37
|
-
accountRequired: wallet_address,
|
|
40
|
+
accountRequired: [wallet_address],
|
|
38
41
|
signature: signature,
|
|
39
42
|
},
|
|
40
43
|
{
|
|
@@ -48,6 +51,10 @@ const subscribe_wallet_transaction_txid = (geyser_ws_url, wallet_address, signat
|
|
|
48
51
|
};
|
|
49
52
|
ws_client.send(JSON.stringify(request));
|
|
50
53
|
}
|
|
54
|
+
setTimeout(() => {
|
|
55
|
+
ws_client.close();
|
|
56
|
+
(0, dist_1.log_debug)('subscribe_transaction_by_txid, close helius ws conn');
|
|
57
|
+
}, 30000);
|
|
51
58
|
function startPing(ws) {
|
|
52
59
|
setInterval(() => {
|
|
53
60
|
if (ws.readyState === ws_1.default.OPEN) {
|