Skip to content

Commit 514b1b3

Browse files
committed
chore: fix formatting issues
This commit fixes formatting issues caused by upgrading the prettier version for the packages that were previously using the pre-commit prettier integration
1 parent acba40f commit 514b1b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+421
-421
lines changed

governance/xc_admin/packages/xc_admin_frontend/components/tabs/Proposals/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const PROPOSAL_STATUSES = [
2020
'draft',
2121
'unkwown',
2222
] as const
23-
export type ProposalStatus = typeof PROPOSAL_STATUSES[number]
23+
export type ProposalStatus = (typeof PROPOSAL_STATUSES)[number]
2424

2525
export const getProposalStatus = (
2626
proposal: TransactionAccount | undefined,

lazer/sdk/js/examples/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const client = await PythLazerClient.create(
1010
["wss://pyth-lazer.dourolabs.app/v1/stream"],
1111
"access_token",
1212
3, // Optionally specify number of parallel redundant connections to reduce the chance of dropped messages. The connections will round-robin across the provided URLs. Default is 3.
13-
console // Optionally log socket operations (to the console in this case.)
13+
console, // Optionally log socket operations (to the console in this case.)
1414
);
1515

1616
// Read and process messages from the Lazer stream
@@ -23,7 +23,7 @@ client.addMessageListener((message) => {
2323
"stream updated for subscription",
2424
message.value.subscriptionId,
2525
":",
26-
message.value.parsed?.priceFeeds
26+
message.value.parsed?.priceFeeds,
2727
);
2828
}
2929
break;

lazer/sdk/js/src/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class PythLazerClient {
4343
urls: string[],
4444
token: string,
4545
numConnections = 3,
46-
logger: Logger = dummyLogger
46+
logger: Logger = dummyLogger,
4747
): Promise<PythLazerClient> {
4848
const wsp = await WebSocketPool.create(urls, token, numConnections, logger);
4949
return new PythLazerClient(wsp);
@@ -71,7 +71,7 @@ export class PythLazerClient {
7171
}
7272
// TODO: some uint64 values may not be representable as Number.
7373
const subscriptionId = Number(
74-
data.subarray(pos, pos + UINT64_NUM_BYTES).readBigInt64BE()
74+
data.subarray(pos, pos + UINT64_NUM_BYTES).readBigInt64BE(),
7575
);
7676
pos += UINT64_NUM_BYTES;
7777

@@ -92,7 +92,7 @@ export class PythLazerClient {
9292
value.leUnsigned = data.subarray(pos, pos + len);
9393
} else if (magic == FORMAT_MAGICS_LE.JSON) {
9494
value.parsed = JSON.parse(
95-
data.subarray(pos + UINT32_NUM_BYTES, pos + len).toString()
95+
data.subarray(pos + UINT32_NUM_BYTES, pos + len).toString(),
9696
) as ParsedPayload;
9797
} else {
9898
throw new Error("unknown magic: " + magic.toString());

lazer/sdk/js/src/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { PublicKey } from "@solana/web3.js";
22

33
export const SOLANA_LAZER_PROGRAM_ID = new PublicKey(
4-
"pytd2yyk641x7ak7mkaasSJVXh6YYZnC7wTmtgAyxPt"
4+
"pytd2yyk641x7ak7mkaasSJVXh6YYZnC7wTmtgAyxPt",
55
);
66
export const SOLANA_STORAGE_ID = new PublicKey(
7-
"3rdJbqfnagQ4yx9HXJViD4zc4xpiSqmFsKpPuSCQVyQL"
7+
"3rdJbqfnagQ4yx9HXJViD4zc4xpiSqmFsKpPuSCQVyQL",
88
);

lazer/sdk/js/src/ed25519.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ const ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<
3434
export const createEd25519Instruction = (
3535
message: Buffer,
3636
instructionIndex: number,
37-
startingOffset: number
37+
startingOffset: number,
3838
) => {
3939
const signatureOffset = startingOffset + MAGIC_LEN;
4040
const publicKeyOffset = signatureOffset + SIGNATURE_LEN;
4141
const messageDataSizeOffset = publicKeyOffset + PUBKEY_LEN;
4242
const messageDataOffset = messageDataSizeOffset + MESSAGE_SIZE_LEN;
4343

4444
const messageDataSize = message.readUInt16LE(
45-
messageDataSizeOffset - startingOffset
45+
messageDataSizeOffset - startingOffset,
4646
);
4747

4848
const instructionData = Buffer.alloc(ED25519_INSTRUCTION_LEN);
@@ -59,7 +59,7 @@ export const createEd25519Instruction = (
5959
messageDataSize: messageDataSize,
6060
messageInstructionIndex: instructionIndex,
6161
},
62-
instructionData
62+
instructionData,
6363
);
6464

6565
return new TransactionInstruction({

lazer/sdk/js/src/socket/resilient-websocket.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class ResilientWebSocket {
3434
constructor(
3535
endpoint: string,
3636
wsOptions?: ClientOptions | ClientRequestArgs,
37-
logger?: Logger
37+
logger?: Logger,
3838
) {
3939
this.endpoint = endpoint;
4040
this.wsOptions = wsOptions;
@@ -60,7 +60,7 @@ export class ResilientWebSocket {
6060

6161
if (this.wsClient === undefined) {
6262
this.logger?.error(
63-
"Couldn't connect to the websocket server. Error callback is called."
63+
"Couldn't connect to the websocket server. Error callback is called.",
6464
);
6565
} else {
6666
this.wsClient.send(data);
@@ -88,7 +88,7 @@ export class ResilientWebSocket {
8888
const timeoutId = setTimeout(() => {
8989
if (this.rejectConnection) {
9090
this.rejectConnection(
91-
new Error(`Connection timeout after ${String(CONNECTION_TIMEOUT)}ms`)
91+
new Error(`Connection timeout after ${String(CONNECTION_TIMEOUT)}ms`),
9292
);
9393
}
9494
}, CONNECTION_TIMEOUT);
@@ -182,7 +182,7 @@ export class ResilientWebSocket {
182182
this.logger?.error(
183183
"Connection closed unexpectedly or because of timeout. Reconnecting after " +
184184
String(waitTime) +
185-
"ms."
185+
"ms.",
186186
);
187187

188188
await sleep(waitTime);
@@ -200,7 +200,7 @@ export class ResilientWebSocket {
200200

201201
if (this.wsClient === undefined) {
202202
this.logger?.error(
203-
"Couldn't reconnect to websocket. Error callback is called."
203+
"Couldn't reconnect to websocket. Error callback is called.",
204204
);
205205
return;
206206
}

lazer/sdk/js/src/socket/websocket-pool.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class WebSocketPool {
4141
urls: string[],
4242
token: string,
4343
numConnections: number = DEFAULT_NUM_CONNECTIONS,
44-
logger: Logger = dummyLogger
44+
logger: Logger = dummyLogger,
4545
): Promise<WebSocketPool> {
4646
if (urls.length === 0) {
4747
throw new Error("No URLs provided");
@@ -76,7 +76,7 @@ export class WebSocketPool {
7676
} catch (error) {
7777
pool.logger.error(
7878
"Failed to resend subscription on reconnect:",
79-
error
79+
error,
8080
);
8181
}
8282
}
@@ -100,7 +100,7 @@ export class WebSocketPool {
100100
}
101101

102102
pool.logger.info(
103-
`Successfully established ${numConnections.toString()} redundant WebSocket connections`
103+
`Successfully established ${numConnections.toString()} redundant WebSocket connections`,
104104
);
105105

106106
return pool;
@@ -114,8 +114,8 @@ export class WebSocketPool {
114114
if (message.type === "subscriptionError") {
115115
throw new Error(
116116
`Error occurred for subscription ID ${String(
117-
message.subscriptionId
118-
)}: ${message.error}`
117+
message.subscriptionId,
118+
)}: ${message.error}`,
119119
);
120120
} else if (message.type === "error") {
121121
throw new Error(`Error: ${message.error}`);

target_chains/cosmwasm/deploy-scripts/src/build-contract.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ function build() {
6060
argv.osmosis === true
6161
? "osmosis"
6262
: argv.injective === true
63-
? "injective"
64-
: undefined;
63+
? "injective"
64+
: undefined;
6565

6666
if (feature === undefined) {
6767
console.log(
68-
"Please provide one of the options: ['cosmwasm', 'injective', 'osmosis']"
68+
"Please provide one of the options: ['cosmwasm', 'injective', 'osmosis']",
6969
);
7070
return;
7171
}

target_chains/cosmwasm/deploy-scripts/src/configs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function getPythSources(deploymentType: DeploymentType) {
1313
governance_source: {
1414
emitter: Buffer.from(
1515
config.governanceDataSource.emitterAddress,
16-
"hex"
16+
"hex",
1717
).toString("base64"),
1818
chain_id: config.governanceDataSource.emitterChain,
1919
},
@@ -62,7 +62,7 @@ export function getWormholeConfig({
6262
fee_denom: feeDenom,
6363
gov_chain: config.governanceChainId,
6464
gov_address: Buffer.from(config.governanceContract, "hex").toString(
65-
"base64"
65+
"base64",
6666
),
6767
guardian_set_expirity: 86400,
6868
initial_guardian_set: {

target_chains/cosmwasm/deploy-scripts/src/helper.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type DeploymentType = "stable" | "beta";
1515
// this method will return an object with key = zipFileName and value = compiledCode
1616
export async function getContractBytesDict(
1717
artifactZipFileNames: string[],
18-
version: string
18+
version: string,
1919
) {
2020
const githubArtifactsLink = `https://github.com/pyth-network/pyth-crosschain/releases/download/pyth-cosmwasm-contract-v${version}/`;
2121
const tmpCodeStorageDir = "./tmp";
@@ -34,7 +34,7 @@ export async function getContractBytesDict(
3434
return new Promise<void>((resolve, reject) => {
3535
const dl = new DownloaderHelper(
3636
githubArtifactsLink + artifactZipName + ".zip",
37-
tmpCodeStorageDir
37+
tmpCodeStorageDir,
3838
);
3939

4040
dl.on("end", () => {
@@ -50,21 +50,21 @@ export async function getContractBytesDict(
5050
reject(err);
5151
});
5252
});
53-
})
53+
}),
5454
);
5555

5656
// extract zip files
5757
uniqueArtifactsZipName.map(async (artifactZipName) => {
5858
const zip = new AdmZip(
59-
path.resolve(tmpCodeStorageDir + "/" + artifactZipName + ".zip")
59+
path.resolve(tmpCodeStorageDir + "/" + artifactZipName + ".zip"),
6060
);
6161
zip.extractAllTo(path.resolve(tmpCodeStorageDir));
6262
});
6363

6464
let contractBytesDict: { [fileName: string]: Buffer } = {};
6565
for (let uniqueArtifactZipName of uniqueArtifactsZipName) {
6666
const contractBytes = readFileSync(
67-
tmpCodeStorageDir + "/" + uniqueArtifactZipName + "/pyth_cosmwasm.wasm"
67+
tmpCodeStorageDir + "/" + uniqueArtifactZipName + "/pyth_cosmwasm.wasm",
6868
);
6969
contractBytesDict[uniqueArtifactZipName] = contractBytes;
7070
}

0 commit comments

Comments
 (0)