Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(lint): update eslint config #72

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
assignees:
- 'acdibble'
commit-message:
prefix: 'chore'
include: 'scope'
groups:
types:
patterns:
- '@types/*'
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
assignees:
- 'acdibble'
commit-message:
prefix: 'chore'
include: 'scope'
allow:
- dependency-name: '@chainflip/*'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@chainflip/eslint-config": "^1.0.3",
"@chainflip/eslint-config": "^1.0.4",
"@eslint/js": "^9.13.0",
"@graphql-codegen/cli": "^5.0.3",
"@graphql-typed-document-node/core": "^3.2.0",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/channels/twitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const sendMessage = async (token: TwitterConfig, text: string) => {
{ text },
{
headers: {
Authorization: authHeader['Authorization'],
Authorization: authHeader.Authorization,
'User-Agent': 'v2CreateTweetJS',
'Content-Type': 'application/json',
Accept: 'application/json',
Expand Down
8 changes: 4 additions & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type Channel = { key: ConfigKey; filters?: Filter[] };

const replaceSpaces = (name: string) => name.replace(/\s+/g, '_');

const config = z
const configSchema = z
.object({
telegram: telegramConfig.optional(),
discord: discordConfig.optional(),
Expand Down Expand Up @@ -147,16 +147,16 @@ const config = z
};
});

export type ParsedConfig = z.output<typeof config>;
export type ConfigFile = z.input<typeof config>;
export type ParsedConfig = z.output<typeof configSchema>;
export type ConfigFile = z.input<typeof configSchema>;

export default class Config {
static #config?: ParsedConfig;

static async #load(): Promise<ParsedConfig> {
if (!this.#config) {
const configFile = env.CONFIG ?? (await fs.readFile('bot.config.json', 'utf-8'));
this.#config = config.parse(JSON.parse(configFile));
this.#config = configSchema.parse(JSON.parse(configFile));
}

return this.#config;
Expand Down
4 changes: 2 additions & 2 deletions src/graphql/generated/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const documents = {
"\n query GetNewSwapRequestsQuery($nativeId: BigInt!) {\n swapRequests: allSwapRequests(\n filter: { nativeId: { greaterThan: $nativeId }, type: { in: [REGULAR, CCM] } }\n ) {\n nodes {\n nativeId\n }\n }\n }\n": types.GetNewSwapRequestsQueryDocument,
"\n query GetSwapInfoByNativeId($nativeId: BigInt!) {\n swap: swapRequestByNativeId(nativeId: $nativeId) {\n completedEventId\n nativeId\n depositAmount\n depositValueUsd\n sourceChain\n numberOfChunks\n destinationAsset\n sourceAsset\n effectiveBoostFeeBps\n egress: egressByEgressId {\n amount\n valueUsd\n scheduledEvent: eventByScheduledEventId {\n block: blockByBlockId {\n timestamp\n }\n }\n }\n refundEgress: egressByRefundEgressId {\n amount\n valueUsd\n }\n swapChannel: swapChannelByDepositChannelId {\n beneficiaries: swapChannelBeneficiariesByDepositChannelId(condition: { type: AFFILIATE }) {\n nodes {\n account: accountByAccountId {\n idSs58\n alias\n }\n }\n }\n broker: brokerByBrokerId {\n account: accountByAccountId {\n alias\n idSs58\n }\n }\n fokMinPriceX128\n issuedBlockTimestamp\n }\n preDepositBlock: foreignChainTrackingByForeignChainPreDepositBlockId {\n stateChainTimestamp\n }\n depositBlock: foreignChainTrackingByForeignChainDepositBlockId {\n stateChainTimestamp\n }\n completedEvent: eventByCompletedEventId {\n block: blockByBlockId {\n timestamp\n }\n }\n executedSwaps: swapsBySwapRequestId(\n filter: { swapExecutedEventId: { isNull: false }, type: { in: [PRINCIPAL, SWAP] } }\n ) {\n totalCount\n }\n boostFee: swapFeesBySwapRequestId(condition: { type: BOOST }) {\n nodes {\n valueUsd\n }\n }\n }\n }\n": types.GetSwapInfoByNativeIdDocument,
"\n query GetNewLiquididityDeposits($id: Int!) {\n deposits: allLiquidityDeposits(filter: { id: { greaterThan: $id } }, orderBy: ID_ASC) {\n nodes {\n asset\n depositAmount\n depositValueUsd\n lp: liquidityProviderByLiquidityProviderId {\n id\n account: accountByAccountId {\n idSs58\n }\n }\n event: eventByEventId {\n block: blockByBlockId {\n timestamp\n }\n }\n }\n }\n }\n": types.GetNewLiquididityDepositsDocument,
"\n query CheckHasOldDeposit($id: Int!, $liquidityProviderId: Int!) {\n deposits: allLiquidityDeposits(\n filter: { id: { lessThan: $id }, liquidityProviderId: { equalTo: $liquidityProviderId } }\n ) {\n nodes {\n id\n liquidityProviderId\n }\n }\n }\n": types.CheckHasOldDepositDocument,
"\n query CheckHasOldDeposit($id: Int!, $liquidityProviderId: Int!) {\n deposits: allLiquidityDeposits(\n filter: { id: { lessThan: $id }, liquidityProviderId: { equalTo: $liquidityProviderId } }\n first: 1\n ) {\n nodes {\n id\n liquidityProviderId\n }\n }\n }\n": types.CheckHasOldDepositDocument,
"\n query GetLatestDepositId {\n deposits: allLiquidityDeposits(first: 1, orderBy: ID_DESC) {\n nodes {\n id\n }\n }\n }\n": types.GetLatestDepositIdDocument,
"\n query GetLpFills($start: Datetime!, $end: Datetime!) {\n limitOrders: allLimitOrderFills(\n filter: { blockTimestamp: { greaterThanOrEqualTo: $start, lessThanOrEqualTo: $end } }\n ) {\n groupedAggregates(groupBy: LIQUIDITY_PROVIDER_ID) {\n keys\n sum {\n filledAmountValueUsd\n }\n }\n }\n rangeOrders: allRangeOrderFills(\n filter: { blockTimestamp: { greaterThanOrEqualTo: $start, lessThanOrEqualTo: $end } }\n ) {\n groupedAggregates(groupBy: LIQUIDITY_PROVIDER_ID) {\n keys\n sum {\n baseFilledAmountValueUsd\n quoteFilledAmountValueUsd\n }\n }\n }\n }\n": types.GetLpFillsDocument,
"\n query GetAccount($ids: [Int!]) {\n accounts: allAccounts(filter: { id: { in: $ids } }) {\n nodes {\n id\n idSs58\n }\n }\n }\n": types.GetAccountDocument,
Expand Down Expand Up @@ -74,7 +74,7 @@ export function gql(source: "\n query GetNewLiquididityDeposits($id: Int!) {\n
/**
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function gql(source: "\n query CheckHasOldDeposit($id: Int!, $liquidityProviderId: Int!) {\n deposits: allLiquidityDeposits(\n filter: { id: { lessThan: $id }, liquidityProviderId: { equalTo: $liquidityProviderId } }\n ) {\n nodes {\n id\n liquidityProviderId\n }\n }\n }\n"): (typeof documents)["\n query CheckHasOldDeposit($id: Int!, $liquidityProviderId: Int!) {\n deposits: allLiquidityDeposits(\n filter: { id: { lessThan: $id }, liquidityProviderId: { equalTo: $liquidityProviderId } }\n ) {\n nodes {\n id\n liquidityProviderId\n }\n }\n }\n"];
export function gql(source: "\n query CheckHasOldDeposit($id: Int!, $liquidityProviderId: Int!) {\n deposits: allLiquidityDeposits(\n filter: { id: { lessThan: $id }, liquidityProviderId: { equalTo: $liquidityProviderId } }\n first: 1\n ) {\n nodes {\n id\n liquidityProviderId\n }\n }\n }\n"): (typeof documents)["\n query CheckHasOldDeposit($id: Int!, $liquidityProviderId: Int!) {\n deposits: allLiquidityDeposits(\n filter: { id: { lessThan: $id }, liquidityProviderId: { equalTo: $liquidityProviderId } }\n first: 1\n ) {\n nodes {\n id\n liquidityProviderId\n }\n }\n }\n"];
/**
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
Expand Down
Loading
Loading