Skip to content

Commit

Permalink
undo change
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Sep 23, 2024
1 parent c2a7cc2 commit df299e8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/soroban-cli/src/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use soroban_env_host::xdr::{
self, AccountId, DecoratedSignature, Hash, HashIdPreimage, HashIdPreimageSorobanAuthorization,
InvokeHostFunctionOp, Limits, Operation, OperationBody, PublicKey, ScAddress, ScMap, ScSymbol,
ScVal, Signature, SignatureHint, SorobanAddressCredentials, SorobanAuthorizationEntry,
SorobanAuthorizedFunction, SorobanCredentials, TransactionEnvelope, TransactionV1Envelope,
Uint256, WriteXdr,
SorobanAuthorizedFunction, SorobanCredentials, Transaction, TransactionEnvelope,
TransactionV1Envelope, Uint256, WriteXdr,
};

pub mod types;
Expand All @@ -29,7 +29,7 @@ pub enum Error {
Xdr(#[from] xdr::Error),
}

fn requires_auth(txn: &xdr::Transaction) -> Option<xdr::Operation> {
fn requires_auth(txn: &Transaction) -> Option<xdr::Operation> {
let [op @ Operation {
body: OperationBody::InvokeHostFunction(InvokeHostFunctionOp { auth, .. }),
..
Expand All @@ -47,12 +47,12 @@ fn requires_auth(txn: &xdr::Transaction) -> Option<xdr::Operation> {
// Use the given source_key and signers, to sign all SorobanAuthorizationEntry's in the given
// transaction. If unable to sign, return an error.
pub fn sign_soroban_authorizations(
raw: &xdr::Transaction,
raw: &Transaction,
source_key: &ed25519_dalek::SigningKey,
signers: &[ed25519_dalek::SigningKey],
signature_expiration_ledger: u32,
network_passphrase: &str,
) -> Result<Option<xdr::Transaction>, Error> {
) -> Result<Option<Transaction>, Error> {
let mut tx = raw.clone();
let Some(mut op) = requires_auth(&tx) else {
return Ok(None);
Expand Down Expand Up @@ -194,7 +194,7 @@ fn sign_soroban_authorization_entry(

pub fn sign_tx(
key: &ed25519_dalek::SigningKey,
tx: &xdr::Transaction,
tx: &Transaction,
network_passphrase: &str,
) -> Result<TransactionEnvelope, Error> {
let tx_hash = transaction_hash(tx, network_passphrase)?;
Expand Down

0 comments on commit df299e8

Please sign in to comment.