Skip to content

Commit b8a4dd3

Browse files
Use Secret's signer fn to get the signer
instead of creating one using the signing key
1 parent 74fb8a3 commit b8a4dd3

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

  • cmd/soroban-cli/src/config

cmd/soroban-cli/src/config/mod.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,10 @@ impl Args {
8989

9090
#[allow(clippy::unused_async)]
9191
pub async fn sign(&self, tx: Transaction) -> Result<TransactionEnvelope, Error> {
92-
let key = self.key_pair()?;
92+
let key = &self.source_account.resolve_secret(&self.locator)?;
93+
let signer = key.signer(self.hd_path, Print::new(false)).await?;
9394
let network = &self.get_network()?;
94-
let signer = Signer {
95-
kind: SignerKind::Local(LocalKey { key }),
96-
print: Print::new(false),
97-
};
95+
9896
Ok(signer.sign_tx(tx, network).await?)
9997
}
10098

0 commit comments

Comments
 (0)