Skip to content

Commit c351493

Browse files
committed
chore: removed unused code
1 parent 0c3077d commit c351493

File tree

3 files changed

+1
-84
lines changed

3 files changed

+1
-84
lines changed

resources/mock-server/src/index.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -91,30 +91,6 @@ export function getPolly(
9191
);
9292
});
9393

94-
// Decode base64-encoded msgpack responses from HAR files during replay
95-
// polly.server.any().on("beforeResponse", (_req, res) => {
96-
// console.log("beforeResponse triggered");
97-
// console.log("Content-Type:", res.headers["content-type"]);
98-
// console.log("Body type:", typeof res.body);
99-
// console.log(
100-
// "Body (first 50 chars):",
101-
// typeof res.body === "string" ? res.body.substring(0, 50) : "NOT A STRING"
102-
// );
103-
104-
// // Decode base64-encoded msgpack responses
105-
// if (
106-
// res.body &&
107-
// typeof res.body === "string" &&
108-
// res.headers["content-type"]?.includes("msgpack")
109-
// ) {
110-
// console.log("Attempting base64 decode...");
111-
// const buffer = Buffer.from(res.body, "base64");
112-
// res.body = new Uint8Array(buffer) as any;
113-
// console.log("Decoded body type:", res.body?.constructor.name);
114-
// console.log("Decoded body length:", res.body?.length);
115-
// }
116-
// });
117-
11894
return polly;
11995
}
12096

resources/mock-server/src/record.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { record } from ".";
22
import {
33
algosdkAlgodRequests,
4-
algosdkAlgodRequests1,
54
algosdkAlgodRequestsWithMainnet,
6-
algosdkAlgodRequestsApiCalls,
7-
algosdkAlgodRequestsTest
5+
algosdkAlgodRequestsApiCalls
86
} from "./requests/algodRequests";
97
import { algosdkKmdRequests } from "./requests/kmdRequests";
108
import { algosdkIndexerRequests } from "./requests/indexerRequests";
@@ -19,7 +17,6 @@ export async function recordAlgosdkRequests(
1917
if (client === "algod") {
2018
makeRequests = async () => {
2119
await algosdkAlgodRequests();
22-
// await algosdkAlgodRequests1();
2320
await algosdkAlgodRequestsWithMainnet();
2421
await algosdkAlgodRequestsApiCalls();
2522
};

resources/mock-server/src/requests/algodRequests.ts

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -160,62 +160,6 @@ export async function algosdkAlgodRequests() {
160160
// const currentOffset = await algod.getBlockOffsetTimestamp().do();
161161
}
162162

163-
export async function algosdkAlgodRequests1() {
164-
// TestNet configuration (using AlgoNode public API)
165-
const algod = new Algodv2(
166-
"a".repeat(64),
167-
// "http://localhost",
168-
// 4001
169-
"https://testnet-api.4160.nodely.dev",
170-
443
171-
);
172-
173-
// ========================================
174-
// TEST DATA SOURCES:
175-
// - Rounds from utils-py test_block.py and test_ledger_state_delta.py
176-
// - Other params from Lora object mothers
177-
// ========================================
178-
179-
// From utils-py: Verified TestNet blocks with state proof transactions
180-
// For simplicity, we use only the first round here
181-
const round = 24099447;
182-
// Use to test multiple rounds, loop through the rounds
183-
const round2 = 24099347;
184-
185-
// From Lora: TestNet object mothers
186-
const address = "25M5BT2DMMED3V6CWDEYKSNEFGPXX4QBIINCOICLXXRU3UGTSGRMF3MTOE";
187-
const appId = 1108; // localnet
188-
// const appId = 718348254; // testnet
189-
const assetId = 705457144;
190-
const txId = "VIXTUMAPT7NR4RB2WVOGMETW4QY43KIDA3HWDWWXS3UEDKGTEECQ";
191-
192-
// ============================================
193-
// TODO ITEMS AND COMMENTED OUT CODE
194-
// ============================================
195-
196-
// // GET /v2/stateproofs/{round}
197-
// // TODO: find a valid value. Will likely have to be done with localnet
198-
// const stateProof = await algod.getStateProof(round).do();
199-
200-
// // GET /v2/transactions/pending/{txid}
201-
// // TODO: find valid values
202-
// const pending = await algod.pendingTransactionInformation(txId).do();
203-
204-
// // GET /v2/deltas/txn/group/{id}
205-
// // SKIP: No group IDs available in Lora object mothers
206-
// // To implement, find a real testnet group ID and use:
207-
// const groupId = "REAL_TESTNET_GROUP_ID";
208-
// const deltaForGroup = await algod
209-
// .getLedgerStateDeltaForTransactionGroup(groupId)
210-
// .do();
211-
212-
// GET /v2/deltas/{round}/txn/group
213-
// const roundWithTxnGroup = 57624226;
214-
// await algod
215-
// .getTransactionGroupLedgerStateDeltasForRound(roundWithTxnGroup)
216-
// .do();
217-
}
218-
219163
export async function algosdkAlgodRequestsWithMainnet() {
220164
// TestNet configuration (using AlgoNode public API)
221165
const algod = new Algodv2(

0 commit comments

Comments
 (0)