From 88d727e7f4e7aa3260d5ce854afd420fd19a5bcd Mon Sep 17 00:00:00 2001 From: Tom Linton Date: Mon, 4 Oct 2021 15:29:52 +1300 Subject: [PATCH] Remove extra file --- cli/src/lib.rs | 1 + examples/tutorial/basic-0/client.js | 27 --------------------------- 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 examples/tutorial/basic-0/client.js diff --git a/cli/src/lib.rs b/cli/src/lib.rs index 7758b94535..f5ec43dee5 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -1672,6 +1672,7 @@ fn start_test_validator( // Return the URL that a validator should be running on given the config // and flags fn test_validator_rpc_url(flags: Option>) -> String { + let flags = flags.unwrap_or_default(); let bind_address = match flags.iter().position(|f| *f == "--bind-address") { Some(position) => flags[position + 1].clone(), None => "127.0.0.1".to_string(), diff --git a/examples/tutorial/basic-0/client.js b/examples/tutorial/basic-0/client.js deleted file mode 100644 index 59b6eabd30..0000000000 --- a/examples/tutorial/basic-0/client.js +++ /dev/null @@ -1,27 +0,0 @@ -// client.js is used to introduce the reader to generating clients from IDLs. -// It is not expected users directly test with this example. For a more -// ergonomic example, see `tests/basic-0.js` in this workspace. - -const anchor = require('@project-serum/anchor'); - -// Configure the local cluster. -anchor.setProvider(anchor.Provider.local()); - -async function main() { - // #region main - // Read the generated IDL. - const idl = JSON.parse(require('fs').readFileSync('./target/idl/basic_0.json', 'utf8')); - - // Address of the deployed program. - const programId = new anchor.web3.PublicKey(''); - - // Generate the program client from IDL. - const program = new anchor.Program(idl, programId); - - // Execute the RPC. - await program.rpc.initialize(); - // #endregion main -} - -console.log('Running client.'); -main().then(() => console.log('Success'));