Skip to content

Commit

Permalink
ts: Use workspace dependencies and fix tests (#2685)
Browse files Browse the repository at this point in the history
  • Loading branch information
acheroncrypto authored Oct 26, 2023
1 parent b6e94da commit 5a655b0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
5 changes: 1 addition & 4 deletions ts/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,5 @@
"ts-node": "*",
"typescript": "*"
},
"dependencies": {
"@coral-xyz/anchor": "=0.28.1-beta.2",
"@solana/web3.js": "*"
}
"dependencies": {}
}
6 changes: 3 additions & 3 deletions ts/tests/src/spl/feature-proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ export async function featureProposalTests() {
}

async function fetchFeatureProposal() {
const featureProposal: { expired?: Buffer } =
await program.account.featureProposal.fetch(featureProposalPk);

const featureProposal = await program.account.featureProposal.fetch(
featureProposalPk
);
if (!featureProposal.expired) {
throw new Error("Feature should be expired.");
}
Expand Down
2 changes: 1 addition & 1 deletion ts/tests/src/spl/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function recordTests() {
});
const kp = await loadKp();

const RECORD_DATA = new Uint8Array(8).fill(1);
const RECORD_DATA = Buffer.alloc(8).fill(1);
const newAuthorityKp = new Keypair();
let recordPk: PublicKey;

Expand Down
2 changes: 1 addition & 1 deletion ts/tests/src/spl/stake-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ export async function stakePoolTests() {

async function setFee() {
await program.methods
.setFee({ solReferral: 5 })
.setFee({ solReferral: [5] })
.accounts({
stakePool: stakePoolPk,
manager: kp.publicKey,
Expand Down
2 changes: 1 addition & 1 deletion ts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@
dependencies:
buffer "~6.0.3"

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

1 comment on commit 5a655b0

@vercel
Copy link

@vercel vercel bot commented on 5a655b0 Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

anchor-docs – ./

anchor-docs-git-master-200ms.vercel.app
anchor-docs-200ms.vercel.app
anchor-lang.com
www.anchor-lang.com

Please sign in to comment.