test
This commit is contained in:
parent
1a50462516
commit
1d2d143f8d
|
@ -27,6 +27,7 @@
|
|||
"types": "lib/cjs/index.d.ts",
|
||||
"scripts": {
|
||||
"docgen": "typedoc --entryPoints src/index.ts --out ../../website/static/api/sbv2-utils",
|
||||
"pretest": "yarn build",
|
||||
"test": "ts-mocha -p ./tsconfig.cjs.json -t 1000000 ./tests/*.tests.ts",
|
||||
"build": "shx rm -rf lib && tsc && tsc -p tsconfig.cjs.json",
|
||||
"watch": "tsc -p tsconfig.cjs.json --watch",
|
||||
|
|
|
@ -80,6 +80,7 @@ async function signAndConfirmTransactions(
|
|||
program.provider as anchor.AnchorProvider
|
||||
).wallet.signAllTransactions(transactions);
|
||||
for (const transaction of signedTxs) {
|
||||
console.log(`Blockhash: ${transaction.recentBlockhash}`);
|
||||
const sig = await program.provider.connection.sendRawTransaction(
|
||||
transaction.serialize(),
|
||||
{ skipPreflight: false, maxRetries: 10 }
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("Feed tests", () => {
|
|||
const provider = new anchor.AnchorProvider(
|
||||
localnetConnection,
|
||||
new AnchorWallet(payer),
|
||||
{ commitment: "confirmed" }
|
||||
{ commitment: "processed" }
|
||||
);
|
||||
switchboard = await SwitchboardTestContext.loadFromEnv(provider);
|
||||
console.log("local env detected");
|
||||
|
@ -40,12 +40,12 @@ describe("Feed tests", () => {
|
|||
|
||||
try {
|
||||
const devnetConnection = new anchor.web3.Connection(
|
||||
"https://devnet.genesysgo.net/"
|
||||
"https://switchboard.devnet.rpcpool.com/f9fe774d81ba4527a418f5b19477"
|
||||
);
|
||||
const provider = new anchor.AnchorProvider(
|
||||
devnetConnection,
|
||||
new AnchorWallet(payer),
|
||||
{ commitment: "confirmed" }
|
||||
{ commitment: "processed" }
|
||||
);
|
||||
// const airdropSignature = await devnetConnection.requestAirdrop(
|
||||
// payer.publicKey,
|
||||
|
|
|
@ -4275,7 +4275,7 @@ export async function packTransactions(
|
|||
): Promise<Transaction[]> {
|
||||
const instructions = transactions.map((t) => t.instructions).flat();
|
||||
const txs = packInstructions(instructions, feePayer);
|
||||
const { blockhash } = await connection.getLatestBlockhash("confirmed");
|
||||
const { blockhash } = await connection.getLatestBlockhash();
|
||||
txs.forEach((t) => {
|
||||
t.recentBlockhash = blockhash;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue