@@ -1191,14 +1191,15 @@ describe("api", async () => {
1191
1191
user8StakeAccountMetadataAddress ,
1192
1192
false ,
1193
1193
) ;
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 ] ;
1202
1203
1203
1204
let user6StakeAccountMetadataAddress =
1204
1205
await user6StakeConnection . getStakeMetadataAddress (
@@ -1220,7 +1221,10 @@ describe("api", async () => {
1220
1221
) ;
1221
1222
instructions . push (
1222
1223
await user8StakeConnection . program . methods
1223
- . delegate ( user8StakeConnection . userPublicKey ( ) , user8StakeConnection . userPublicKey ( ) )
1224
+ . delegate (
1225
+ user8StakeConnection . userPublicKey ( ) ,
1226
+ user8StakeConnection . userPublicKey ( ) ,
1227
+ )
1224
1228
. accountsPartial ( {
1225
1229
currentDelegateStakeAccountCheckpoints :
1226
1230
previousUser8StakeAccountCheckpointsAddress ,
@@ -1237,15 +1241,19 @@ describe("api", async () => {
1237
1241
. createCheckpoints ( )
1238
1242
. accounts ( {
1239
1243
payer : user8StakeConnection . userPublicKey ( ) ,
1240
- stakeAccountCheckpoints : previousUser8StakeAccountCheckpointsAddress ,
1244
+ stakeAccountCheckpoints :
1245
+ previousUser8StakeAccountCheckpointsAddress ,
1241
1246
newStakeAccountCheckpoints : user8StakeAccountCheckpointsAddress ,
1242
1247
stakeAccountMetadata : user8StakeAccountMetadataAddress ,
1243
1248
} )
1244
1249
. instruction ( ) ,
1245
1250
) ;
1246
1251
instructions . push (
1247
1252
await user8StakeConnection . program . methods
1248
- . delegate ( user6StakeConnection . userPublicKey ( ) , user8StakeConnection . userPublicKey ( ) )
1253
+ . delegate (
1254
+ user6StakeConnection . userPublicKey ( ) ,
1255
+ user8StakeConnection . userPublicKey ( ) ,
1256
+ )
1249
1257
. accountsPartial ( {
1250
1258
currentDelegateStakeAccountCheckpoints :
1251
1259
user8StakeAccountCheckpointsAddress ,
@@ -1257,7 +1265,9 @@ describe("api", async () => {
1257
1265
} )
1258
1266
. instruction ( ) ,
1259
1267
) ;
1260
- await user8StakeConnection . sendAndConfirmAsVersionedTransaction ( instructions ) ;
1268
+ await user8StakeConnection . sendAndConfirmAsVersionedTransaction (
1269
+ instructions ,
1270
+ ) ;
1261
1271
1262
1272
await sleep ( 2000 ) ;
1263
1273
await user8StakeConnection . delegate (
@@ -1269,8 +1279,14 @@ describe("api", async () => {
1269
1279
await user8StakeConnection . fetchCheckpointAccount (
1270
1280
user8StakeAccountCheckpointsAddress ,
1271
1281
) ;
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
+ ) ;
1274
1290
1275
1291
let proposalIdInput = await addTestProposal (
1276
1292
user8StakeConnection ,
@@ -1297,9 +1313,7 @@ describe("api", async () => {
1297
1313
1298
1314
assert . fail ( "Expected an error but none was thrown" ) ;
1299
1315
} catch ( e ) {
1300
- assert (
1301
- ( e as AnchorError ) . error ?. errorCode ?. code === "NoWeight" ,
1302
- ) ;
1316
+ assert ( ( e as AnchorError ) . error ?. errorCode ?. code === "NoWeight" ) ;
1303
1317
}
1304
1318
} ) ;
1305
1319
0 commit comments