Skip to content

Commit fd5ce55

Browse files
committed
Fixing linting errors in services
1 parent 96ff501 commit fd5ce55

15 files changed

Lines changed: 24 additions & 17 deletions

File tree

packages/services/api/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"publishConfig": {
99
"access": "public"
1010
},
11+
"type": "module",
1112
"scripts": {
1213
"build": "tsc",
1314
"dev": "tsc --watch",

packages/services/api/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class SequenceAPIClient extends ApiRpc {
1515
_fetch = (input: RequestInfo, init?: RequestInit): Promise<Response> => {
1616
// automatically include jwt and access key auth header to requests
1717
// if its been set on the api client
18-
const headers: { [key: string]: any } = {}
18+
const headers: Record<string, string> = {}
1919

2020
const jwtAuth = this.jwtAuth
2121
const projectAccessKey = this.projectAccessKey

packages/services/builder/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"publishConfig": {
99
"access": "public"
1010
},
11+
"type": "module",
1112
"scripts": {
1213
"build": "tsc",
1314
"dev": "tsc --watch",

packages/services/builder/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class SequenceBuilderClient extends BuilderRpc {
1515
_fetch = (input: RequestInfo, init?: RequestInit): Promise<Response> => {
1616
// automatically include access key auth header to requests
1717
// if its been set on the api client
18-
const headers: { [key: string]: any } = {}
18+
const headers: Record<string, string> = {}
1919

2020
const projectAccessKey = this.projectAccessKey
2121
if (projectAccessKey && projectAccessKey.length > 0) {

packages/services/guard/src/local.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Address, Hex, Bytes, Secp256k1, Hash } from 'ox'
1+
import { Address, Hex, Bytes, Secp256k1 } from 'ox'
22
import * as Client from './client/guard.gen.js'
33
import * as Types from './types.js'
44

@@ -11,12 +11,13 @@ export class Guard implements Types.Guard {
1111
}
1212

1313
async signPayload(
14-
wallet: Address.Address,
15-
chainId: number,
16-
type: Client.PayloadType,
14+
_wallet: Address.Address,
15+
_chainId: number,
16+
_type: Client.PayloadType,
1717
digest: Bytes.Bytes,
18-
message: Bytes.Bytes,
19-
signatures?: Client.Signature[],
18+
_message: Bytes.Bytes,
19+
_signatures?: Client.Signature[],
20+
_token?: Client.AuthToken,
2021
) {
2122
return Secp256k1.sign({ privateKey: this.privateKey, payload: digest })
2223
}

packages/services/guard/src/sequence.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Address, Hex, Signature, Bytes, Hash } from 'ox'
1+
import { Address, Hex, Signature, Bytes } from 'ox'
22
import * as Client from './client/guard.gen.js'
33
import * as Types from './types.js'
44

packages/services/guard/test/sequence.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Address, Bytes, Hex } from 'ox'
55

66
// Mock fetch globally for guard API calls
77
const mockFetch = vi.fn()
8-
global.fetch = mockFetch
8+
globalThis.fetch = mockFetch
99

1010
describe('Sequence', () => {
1111
describe('GuardSigner', () => {
@@ -86,7 +86,7 @@ describe('Sequence', () => {
8686
ok: true,
8787
})
8888

89-
await guard.signPayload(testWallet, 1, PayloadType.ConfigUpdate, testMessageDigest, testMessage)
89+
await guard.signPayload(testWallet, customChainId, PayloadType.ConfigUpdate, testMessageDigest, testMessage)
9090

9191
const requestBody = JSON.parse(mockFetch.mock.calls[0][1].body)
9292
expect(requestBody.request.chainId).toBe(1)

packages/services/indexer/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"publishConfig": {
99
"access": "public"
1010
},
11+
"type": "module",
1112
"scripts": {
1213
"build": "tsc",
1314
"dev": "tsc --watch",

packages/services/indexer/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class SequenceIndexer extends IndexerRpc {
1717
_fetch = (input: RequestInfo, init?: RequestInit): Promise<Response> => {
1818
// automatically include jwt and access key auth header to requests
1919
// if its been set on the api client
20-
const headers: { [key: string]: any } = {}
20+
const headers: Record<string, string> = {}
2121

2222
const jwtAuth = this.jwtAuth
2323
const projectAccessKey = this.projectAccessKey
@@ -50,7 +50,7 @@ export class SequenceIndexerGateway extends IndexerGatewayRpc {
5050
_fetch = (input: RequestInfo, init?: RequestInit): Promise<Response> => {
5151
// automatically include jwt and access key auth header to requests
5252
// if its been set on the api client
53-
const headers: { [key: string]: any } = {}
53+
const headers: Record<string, string> = {}
5454

5555
const jwtAuth = this.jwtAuth
5656
const projectAccessKey = this.projectAccessKey

packages/services/marketplace/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"publishConfig": {
99
"access": "public"
1010
},
11+
"type": "module",
1112
"scripts": {
1213
"build": "tsc",
1314
"dev": "tsc --watch",

0 commit comments

Comments
 (0)