Skip to content

Commit 6960dfc

Browse files
committed
Apply yarn format
1 parent 6d047e5 commit 6960dfc

File tree

1 file changed

+31
-17
lines changed

1 file changed

+31
-17
lines changed

solana/tests/api_test.ts

+31-17
Original file line numberDiff line numberDiff line change
@@ -1191,14 +1191,15 @@ describe("api", async () => {
11911191
user8StakeAccountMetadataAddress,
11921192
false,
11931193
);
1194-
let user8StakeAccountCheckpointsAddress = PublicKey.findProgramAddressSync(
1195-
[
1196-
utils.bytes.utf8.encode(wasm.Constants.CHECKPOINT_DATA_SEED()),
1197-
user8StakeConnection.userPublicKey().toBuffer(),
1198-
Buffer.from([1]),
1199-
],
1200-
user8StakeConnection.program.programId,
1201-
)[0];
1194+
let user8StakeAccountCheckpointsAddress =
1195+
PublicKey.findProgramAddressSync(
1196+
[
1197+
utils.bytes.utf8.encode(wasm.Constants.CHECKPOINT_DATA_SEED()),
1198+
user8StakeConnection.userPublicKey().toBuffer(),
1199+
Buffer.from([1]),
1200+
],
1201+
user8StakeConnection.program.programId,
1202+
)[0];
12021203

12031204
let user6StakeAccountMetadataAddress =
12041205
await user6StakeConnection.getStakeMetadataAddress(
@@ -1220,7 +1221,10 @@ describe("api", async () => {
12201221
);
12211222
instructions.push(
12221223
await user8StakeConnection.program.methods
1223-
.delegate(user8StakeConnection.userPublicKey(), user8StakeConnection.userPublicKey())
1224+
.delegate(
1225+
user8StakeConnection.userPublicKey(),
1226+
user8StakeConnection.userPublicKey(),
1227+
)
12241228
.accountsPartial({
12251229
currentDelegateStakeAccountCheckpoints:
12261230
previousUser8StakeAccountCheckpointsAddress,
@@ -1237,15 +1241,19 @@ describe("api", async () => {
12371241
.createCheckpoints()
12381242
.accounts({
12391243
payer: user8StakeConnection.userPublicKey(),
1240-
stakeAccountCheckpoints: previousUser8StakeAccountCheckpointsAddress,
1244+
stakeAccountCheckpoints:
1245+
previousUser8StakeAccountCheckpointsAddress,
12411246
newStakeAccountCheckpoints: user8StakeAccountCheckpointsAddress,
12421247
stakeAccountMetadata: user8StakeAccountMetadataAddress,
12431248
})
12441249
.instruction(),
12451250
);
12461251
instructions.push(
12471252
await user8StakeConnection.program.methods
1248-
.delegate(user6StakeConnection.userPublicKey(), user8StakeConnection.userPublicKey())
1253+
.delegate(
1254+
user6StakeConnection.userPublicKey(),
1255+
user8StakeConnection.userPublicKey(),
1256+
)
12491257
.accountsPartial({
12501258
currentDelegateStakeAccountCheckpoints:
12511259
user8StakeAccountCheckpointsAddress,
@@ -1257,7 +1265,9 @@ describe("api", async () => {
12571265
})
12581266
.instruction(),
12591267
);
1260-
await user8StakeConnection.sendAndConfirmAsVersionedTransaction(instructions);
1268+
await user8StakeConnection.sendAndConfirmAsVersionedTransaction(
1269+
instructions,
1270+
);
12611271

12621272
await sleep(2000);
12631273
await user8StakeConnection.delegate(
@@ -1269,8 +1279,14 @@ describe("api", async () => {
12691279
await user8StakeConnection.fetchCheckpointAccount(
12701280
user8StakeAccountCheckpointsAddress,
12711281
);
1272-
assert.equal(user8StakeAccountCheckpoints.checkpoints[0].value.toString(), "0");
1273-
assert.equal(user8StakeAccountCheckpoints.checkpoints[1].value.toString(), "225000000");
1282+
assert.equal(
1283+
user8StakeAccountCheckpoints.checkpoints[0].value.toString(),
1284+
"0",
1285+
);
1286+
assert.equal(
1287+
user8StakeAccountCheckpoints.checkpoints[1].value.toString(),
1288+
"225000000",
1289+
);
12741290

12751291
let proposalIdInput = await addTestProposal(
12761292
user8StakeConnection,
@@ -1297,9 +1313,7 @@ describe("api", async () => {
12971313

12981314
assert.fail("Expected an error but none was thrown");
12991315
} catch (e) {
1300-
assert(
1301-
(e as AnchorError).error?.errorCode?.code === "NoWeight",
1302-
);
1316+
assert((e as AnchorError).error?.errorCode?.code === "NoWeight");
13031317
}
13041318
});
13051319

0 commit comments

Comments
 (0)