Skip to content

Commit

Permalink
fix: rename sign_with_local_key to sign
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Jun 20, 2024
1 parent a71be6c commit 5c5e641
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions cmd/soroban-cli/src/commands/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ impl Args {
Ok(self.signer()?.get_public_key().await?)
}

pub async fn sign_with_local_key(&self, tx: Transaction) -> Result<TransactionEnvelope, Error> {
pub async fn sign(&self, tx: Transaction) -> Result<TransactionEnvelope, Error> {
let signer = self.signer()?;
self.sign(&signer, tx).await
self.sign_with_signer(&signer, tx).await
}

pub async fn sign(
pub async fn sign_with_signer(
&self,
signer: &impl Stellar,
tx: Transaction,
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/contract/deploy/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl NetworkRunnable for Cmd {
return Ok(TxnResult::Txn(txn));
}
let get_txn_resp = client
.send_transaction_polling(&self.config.sign_with_local_key(txn).await?)
.send_transaction_polling(&self.config.sign(txn).await?)
.await?
.try_into()?;
if args.map_or(true, |a| !a.no_cache) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/contract/deploy/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl NetworkRunnable for Cmd {
return Ok(TxnResult::Txn(txn));
}
let get_txn_resp = client
.send_transaction_polling(&config.sign_with_local_key(txn).await?)
.send_transaction_polling(&config.sign(txn).await?)
.await?
.try_into()?;
if global_args.map_or(true, |a| !a.no_cache) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/contract/extend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl NetworkRunnable for Cmd {
.transaction()
.clone();
let res = client
.send_transaction_polling(&config.sign_with_local_key(tx).await?)
.send_transaction_polling(&config.sign(tx).await?)
.await?;
if args.map_or(true, |a| !a.no_cache) {
data::write(res.clone().try_into()?, &network.rpc_uri()?)?;
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/contract/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl NetworkRunnable for Cmd {
return Ok(TxnResult::Txn(txn));
}
let txn_resp = client
.send_transaction_polling(&self.config.sign_with_local_key(txn).await?)
.send_transaction_polling(&self.config.sign(txn).await?)
.await?;
if args.map_or(true, |a| !a.no_cache) {
data::write(txn_resp.clone().try_into().unwrap(), &network.rpc_uri()?)?;
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/contract/invoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ impl NetworkRunnable for Cmd {
}
// log_auth_cost_and_footprint(resources(&txn));
let res = client
.send_transaction_polling(&config.sign_with_local_key(txn).await?)
.send_transaction_polling(&config.sign(txn).await?)
.await?;
if !no_cache {
data::write(res.clone().try_into()?, &network.rpc_uri()?)?;
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/contract/restore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl NetworkRunnable for Cmd {
return Ok(TxnResult::Txn(tx));
}
let res = client
.send_transaction_polling(&config.sign_with_local_key(tx).await?)
.send_transaction_polling(&config.sign(tx).await?)
.await?;
if args.map_or(true, |a| !a.no_cache) {
data::write(res.clone().try_into()?, &network.rpc_uri()?)?;
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/tx/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ impl Cmd {
}

pub async fn sign(&self, tx: Transaction) -> Result<TransactionEnvelope, Error> {
Ok(self.config.sign_with_local_key(tx).await?)
Ok(self.config.sign(tx).await?)
}
}

0 comments on commit 5c5e641

Please sign in to comment.