From 2a09b0a326f844253339ca672bce97c738dbaccf Mon Sep 17 00:00:00 2001
From: Peter White <petras9789@gmail.com>
Date: Fri, 13 Dec 2024 10:30:10 -0700
Subject: [PATCH] fix: minor fixes after rebase

---
 Cargo.lock                                 |  2 ++
 crates/pop-cli/src/commands/up/contract.rs | 17 -----------------
 crates/pop-cli/src/wallet_integration.rs   |  1 +
 crates/pop-contracts/Cargo.toml            |  4 +++-
 crates/pop-contracts/src/up.rs             |  5 ++---
 5 files changed, 8 insertions(+), 21 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 990404188..9887bd521 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -9396,6 +9396,8 @@ dependencies = [
  "sp-weights",
  "strum 0.26.3",
  "strum_macros 0.26.4",
+ "subxt",
+ "subxt-signer",
  "tar",
  "tempfile",
  "thiserror 1.0.69",
diff --git a/crates/pop-cli/src/commands/up/contract.rs b/crates/pop-cli/src/commands/up/contract.rs
index 45e9d38b1..4f0e245b5 100644
--- a/crates/pop-cli/src/commands/up/contract.rs
+++ b/crates/pop-cli/src/commands/up/contract.rs
@@ -427,23 +427,6 @@ impl From<UpContractCommand> for UpOpts {
 	}
 }
 
-/// Checks if a contract has been built by verifying the existence of the build directory and the
-/// <name>.contract file.
-///
-/// # Arguments
-/// * `path` - An optional path to the project directory. If no path is provided, the current
-///   directory is used.
-pub fn has_contract_been_built(path: Option<&Path>) -> bool {
-	let project_path = path.unwrap_or_else(|| Path::new("./"));
-	let manifest = match from_path(Some(project_path)) {
-		Ok(manifest) => manifest,
-		Err(_) => return false,
-	};
-	let contract_name = manifest.package().name();
-	project_path.join("target/ink").exists() &&
-		project_path.join(format!("target/ink/{}.contract", contract_name)).exists()
-}
-
 fn display_contract_info(spinner: &ProgressBar, address: String, code_hash: Option<String>) {
 	spinner.stop(format!(
 		"Contract deployed and instantiated:\n{}",
diff --git a/crates/pop-cli/src/wallet_integration.rs b/crates/pop-cli/src/wallet_integration.rs
index 4b9d6e7e4..3949d1dd9 100644
--- a/crates/pop-cli/src/wallet_integration.rs
+++ b/crates/pop-cli/src/wallet_integration.rs
@@ -29,6 +29,7 @@ impl TransactionData {
 	pub fn new(chain_rpc: String, call_data: Vec<u8>) -> Self {
 		Self { chain_rpc, call_data }
 	}
+	#[allow(dead_code)]
 	pub fn call_data(&self) -> Vec<u8> {
 		self.call_data.clone()
 	}
diff --git a/crates/pop-contracts/Cargo.toml b/crates/pop-contracts/Cargo.toml
index b3ab82cb8..94a2c6e72 100644
--- a/crates/pop-contracts/Cargo.toml
+++ b/crates/pop-contracts/Cargo.toml
@@ -27,11 +27,13 @@ sp-core.workspace = true
 sp-weights.workspace = true
 strum.workspace = true
 strum_macros.workspace = true
+subxt-signer.workspace = true
+subxt.workspace = true
 
 # cargo-contracts
 contract-build.workspace = true
 contract-extrinsics.workspace = true
-contract-transcode.workspace = true 
+contract-transcode.workspace = true
 scale-info.workspace = true
 #  pop
 pop-common = { path = "../pop-common", version = "0.5.0" }
diff --git a/crates/pop-contracts/src/up.rs b/crates/pop-contracts/src/up.rs
index 97c396ce8..668d6b1e0 100644
--- a/crates/pop-contracts/src/up.rs
+++ b/crates/pop-contracts/src/up.rs
@@ -18,15 +18,14 @@ use pop_common::{create_signer, DefaultConfig, Keypair};
 use sp_core::{bytes::from_hex, Bytes};
 use sp_weights::Weight;
 use std::{
-	fmt::{format, Write},
+	fmt::Write,
 	path::{Path, PathBuf},
 };
 use subxt::{
 	blocks::ExtrinsicEvents,
 	tx::{Payload, SubmittableExtrinsic},
-	Config, PolkadotConfig as DefaultConfig, SubstrateConfig,
+	Config, SubstrateConfig,
 };
-use subxt_signer::sr25519::Keypair;
 
 /// Attributes for the `up` command
 #[derive(Clone, Debug, PartialEq)]