diff --git a/package.json b/package.json index 069eb2a..2b74cbf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@shadow-drive/cli", - "version": "0.4.0", + "version": "0.4.1", "main": "shdw-drive.js", "bin": { "shdw-drive": "./dist/shdw-drive.js" diff --git a/src/shdw-drive.ts b/src/shdw-drive.ts index 4e20604..d2f58cc 100644 --- a/src/shdw-drive.ts +++ b/src/shdw-drive.ts @@ -53,7 +53,7 @@ programCommand("create-storage-account") .action(async (options, cmd) => { const keypair = loadWalletKey(options.keypair); const wallet = new anchor.Wallet(keypair); - const connection = new anchor.web3.Connection(options.rpc, "processed"); + const connection = new anchor.web3.Connection(options.rpc, "confirmed"); const drive = await new ShdwDrive(connection, wallet).init(); const userInfo = drive.userInfo; const storageConfig = drive.storageConfigPDA; @@ -213,7 +213,7 @@ programCommand("edit-file") .action(async (options, cmd) => { const keypair = loadWalletKey(options.keypair); const wallet = new anchor.Wallet(keypair); - const connection = new anchor.web3.Connection(options.rpc, "processed"); + const connection = new anchor.web3.Connection(options.rpc, "confirmed"); const drive = await new ShdwDrive(connection, wallet).init(); const userInfo = drive.userInfo; const storageConfig = drive.storageConfigPDA; @@ -297,7 +297,7 @@ async function handleUpload( ) { const keypair = loadWalletKey(options.keypair); const wallet = new anchor.Wallet(keypair); - const connection = new anchor.web3.Connection(options.rpc, "processed"); + const connection = new anchor.web3.Connection(options.rpc, "confirmed"); const drive = await new ShdwDrive(connection, wallet).init(); const userInfo = drive.userInfo; const [programClient, provider] = getAnchorEnvironment(keypair, connection); @@ -565,7 +565,7 @@ programCommand("delete-file") const keypair = loadWalletKey(path.resolve(options.keypair)); log.debug("Input params:", { options }); const wallet = new anchor.Wallet(keypair); - const connection = new anchor.web3.Connection(options.rpc, "processed"); + const connection = new anchor.web3.Connection(options.rpc, "confirmed"); const drive = await new ShdwDrive(connection, wallet).init(); const [programClient, provider] = getAnchorEnvironment( @@ -627,7 +627,7 @@ programCommand("get-storage-account") .action(async (options, cmd) => { const keypair = loadWalletKey(path.resolve(options.keypair)); const wallet = new anchor.Wallet(keypair); - const connection = new anchor.web3.Connection(options.rpc, "processed"); + const connection = new anchor.web3.Connection(options.rpc, "confirmed"); const drive = await new ShdwDrive(connection, wallet).init(); const userInfo = drive.userInfo; const [programClient, provider] = getAnchorEnvironment( @@ -689,7 +689,7 @@ programCommand("delete-storage-account") .action(async (options, cmd) => { const keypair = loadWalletKey(options.keypair); const wallet = new anchor.Wallet(keypair); - const connection = new anchor.web3.Connection(options.rpc, "processed"); + const connection = new anchor.web3.Connection(options.rpc, "confirmed"); const drive = await new ShdwDrive(connection, wallet).init(); const userInfo = drive.userInfo; @@ -780,7 +780,7 @@ programCommand("undelete-storage-account") .action(async (options, cmd) => { const keypair = loadWalletKey(options.keypair); const wallet = new anchor.Wallet(keypair); - const connection = new anchor.web3.Connection(options.rpc, "processed"); + const connection = new anchor.web3.Connection(options.rpc, "confirmed"); const drive = await new ShdwDrive(connection, wallet).init(); const userInfo = drive.userInfo; const [programClient, provider] = getAnchorEnvironment( @@ -883,7 +883,7 @@ programCommand("add-storage") .action(async (options, cmd) => { const keypair = loadWalletKey(options.keypair); const wallet = new anchor.Wallet(keypair); - const connection = new anchor.web3.Connection(options.rpc, "processed"); + const connection = new anchor.web3.Connection(options.rpc, "confirmed"); const drive = await new ShdwDrive(connection, wallet).init(); const userInfo = drive.userInfo; @@ -1019,7 +1019,7 @@ programCommand("reduce-storage") log.debug("storageInputAsBytes", storageInputAsBytes); const keypair = loadWalletKey(options.keypair); const wallet = new anchor.Wallet(keypair); - const connection = new anchor.web3.Connection(options.rpc, "processed"); + const connection = new anchor.web3.Connection(options.rpc, "confirmed"); const drive = await new ShdwDrive(connection, wallet).init(); const userInfo = drive.userInfo; const [programClient, provider] = getAnchorEnvironment( @@ -1121,7 +1121,7 @@ programCommand("make-storage-account-immutable") .action(async (options, cmd) => { const keypair = loadWalletKey(options.keypair); const wallet = new anchor.Wallet(keypair); - const connection = new anchor.web3.Connection(options.rpc, "processed"); + const connection = new anchor.web3.Connection(options.rpc, "confirmed"); const drive = await new ShdwDrive(connection, wallet).init(); @@ -1220,7 +1220,7 @@ programCommand("claim-stake") .action(async (options, cmd) => { const keypair = loadWalletKey(options.keypair); const wallet = new anchor.Wallet(keypair); - const connection = new anchor.web3.Connection(options.rpc, "processed"); + const connection = new anchor.web3.Connection(options.rpc, "confirmed"); const drive = await new ShdwDrive(connection, wallet).init(); const userInfo = drive.userInfo; const [programClient, provider] = getAnchorEnvironment( @@ -1390,7 +1390,7 @@ programCommand("redeem-file-account-rent") .action(async (options, cmd) => { const keypair = loadWalletKey(options.keypair); const wallet = new anchor.Wallet(keypair); - const connection = new anchor.web3.Connection(options.rpc, "processed"); + const connection = new anchor.web3.Connection(options.rpc, "confirmed"); const drive = await new ShdwDrive(connection, wallet).init();