Skip to content

Commit 5a655b0

Browse files
ts: Use workspace dependencies and fix tests (#2685)
1 parent b6e94da commit 5a655b0

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

Diff for: ts/tests/package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,5 @@
1212
"ts-node": "*",
1313
"typescript": "*"
1414
},
15-
"dependencies": {
16-
"@coral-xyz/anchor": "=0.28.1-beta.2",
17-
"@solana/web3.js": "*"
18-
}
15+
"dependencies": {}
1916
}

Diff for: ts/tests/src/spl/feature-proposal.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ export async function featureProposalTests() {
8686
}
8787

8888
async function fetchFeatureProposal() {
89-
const featureProposal: { expired?: Buffer } =
90-
await program.account.featureProposal.fetch(featureProposalPk);
91-
89+
const featureProposal = await program.account.featureProposal.fetch(
90+
featureProposalPk
91+
);
9292
if (!featureProposal.expired) {
9393
throw new Error("Feature should be expired.");
9494
}

Diff for: ts/tests/src/spl/record.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export async function recordTests() {
2020
});
2121
const kp = await loadKp();
2222

23-
const RECORD_DATA = new Uint8Array(8).fill(1);
23+
const RECORD_DATA = Buffer.alloc(8).fill(1);
2424
const newAuthorityKp = new Keypair();
2525
let recordPk: PublicKey;
2626

Diff for: ts/tests/src/spl/stake-pool.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ export async function stakePoolTests() {
454454

455455
async function setFee() {
456456
await program.methods
457-
.setFee({ solReferral: 5 })
457+
.setFee({ solReferral: [5] })
458458
.accounts({
459459
stakePool: stakePoolPk,
460460
manager: kp.publicKey,

Diff for: ts/yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@
880880
dependencies:
881881
buffer "~6.0.3"
882882

883-
"@solana/web3.js@*", "@solana/web3.js@^1.32.0", "@solana/web3.js@^1.68.0":
883+
"@solana/web3.js@^1.32.0", "@solana/web3.js@^1.68.0":
884884
version "1.68.0"
885885
resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.68.0.tgz#ded078d6e72f9f4b46e0f69925d4fe5c6cdcef54"
886886
integrity sha512-i41x4ArQrjdy/iQf75vKwZa+Mx1hOVquamHHe+5lNbObF4CT57oHOTvG9m9DTypuip3O9ucLoryywd6LfP2eEw==

0 commit comments

Comments
 (0)