Skip to content

Commit

Permalink
error when no solana secret key passed in
Browse files Browse the repository at this point in the history
  • Loading branch information
nazreen committed Dec 16, 2024
1 parent d45ac08 commit d01bda5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions examples/oft-solana/tasks/common/wire.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,13 @@ task(TASK_LZ_OAPP_WIRE)
//
//

if (args.solanaSecretKey == null) {
logger.warn(
`Missing --solana-secret-key CLI argument. A random keypair will be generated and interaction with solana programs will not be possible`
)
if (!args.solanaSecretKey) {
logger.error('Missing --solana-secret-key CLI argument.')
return
}

// The first step is to create the user Keypair from the secret passed in
const wallet = args.solanaSecretKey ?? Keypair.generate()
const wallet = args.solanaSecretKey
const userAccount = wallet.publicKey

// Then we grab the programId from the args
Expand Down

0 comments on commit d01bda5

Please sign in to comment.