Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Commit 9c34b6f

Browse files
committed
Renamed header field 'x-request-id' to 'x-cache-id'
1 parent 207888e commit 9c34b6f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/services/ablock.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,7 +1450,7 @@ export class ABlockWallet {
14501450
* @param {string} route
14511451
* @return {*} {{
14521452
* headers: {
1453-
* 'x-request-id': string;
1453+
* 'x-cache-id': string;
14541454
* 'x-nonce': number;
14551455
* };
14561456
* }}
@@ -1461,7 +1461,7 @@ export class ABlockWallet {
14611461
route: string,
14621462
): {
14631463
headers: {
1464-
'x-request-id': string;
1464+
'x-cache-id': string;
14651465
'x-nonce': number;
14661466
};
14671467
} {

src/utils/general.utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export function truncateByBytesUTF8(chars: string, n: number): string {
113113
try {
114114
return fromBytesUTF8(bytes);
115115
// eslint-disable-next-line no-empty
116-
} catch (e) {}
116+
} catch (e) { }
117117
bytes = bytes.substring(0, bytes.length - 1);
118118
}
119119
}
@@ -214,17 +214,17 @@ export function calculateNonceForId(target: number, id: string): number {
214214
* @export
215215
* @param {number} [difficulty]
216216
* @return {*} {{
217-
* headers: { 'x-request-id': string; 'x-nonce': number };
217+
* headers: { 'x-cache-id': string; 'x-nonce': number };
218218
* }}
219219
*/
220220
export function createIdAndNonceHeaders(difficulty?: number): {
221-
headers: { 'x-request-id': string; 'x-nonce': number };
221+
headers: { 'x-cache-id': string; 'x-nonce': number };
222222
} {
223223
const id = getUniqueID();
224224
const nonce = difficulty ? calculateNonceForId(difficulty, id) : 0;
225225
return {
226226
headers: {
227-
'x-request-id': id,
227+
'x-cache-id': id,
228228
'x-nonce': nonce,
229229
},
230230
};

0 commit comments

Comments
 (0)