Skip to content

Commit fdec3ca

Browse files
authored
Remove dead code. (#2221)
1 parent c69e014 commit fdec3ca

1 file changed

Lines changed: 1 addition & 31 deletions

File tree

  • cmd/soroban-cli/src/commands/snapshot

cmd/soroban-cli/src/commands/snapshot/create.rs

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -445,19 +445,6 @@ impl Cmd {
445445
.ok_or(Error::ArchiveUrlNotConfigured)
446446
}
447447

448-
#[allow(dead_code)]
449-
async fn resolve_address(
450-
&self,
451-
address: &str,
452-
network_passphrase: &str,
453-
) -> Option<Either<AccountId, ScAddress>> {
454-
if let Some(contract) = self.resolve_contract(address, network_passphrase) {
455-
Some(Either::Right(contract))
456-
} else {
457-
self.resolve_account(address).await.map(Either::Left)
458-
}
459-
}
460-
461448
fn resolve_address_sync(
462449
&self,
463450
address: &str,
@@ -470,24 +457,6 @@ impl Cmd {
470457
}
471458
}
472459

473-
// Resolve an account address to an account id. The address can be a
474-
// G-address or a key name (as in `stellar keys address NAME`).
475-
async fn resolve_account(&self, address: &str) -> Option<AccountId> {
476-
let address: UnresolvedMuxedAccount = address.parse().ok()?;
477-
Some(AccountId(xdr::PublicKey::PublicKeyTypeEd25519(
478-
match address
479-
.resolve_muxed_account(&self.locator, None)
480-
.await
481-
.ok()?
482-
{
483-
xdr::MuxedAccount::Ed25519(uint256) => uint256,
484-
xdr::MuxedAccount::MuxedEd25519(xdr::MuxedAccountMed25519 { ed25519, .. }) => {
485-
ed25519
486-
}
487-
},
488-
)))
489-
}
490-
491460
// Resolve an account address to an account id. The address can be a
492461
// G-address or a key name (as in `stellar keys address NAME`).
493462
fn resolve_account_sync(&self, address: &str) -> Option<AccountId> {
@@ -497,6 +466,7 @@ impl Cmd {
497466
.ok()?;
498467
Some(muxed_account.account_id())
499468
}
469+
500470
// Resolve a contract address to a contract id. The contract can be a
501471
// C-address or a contract alias.
502472
fn resolve_contract(&self, address: &str, network_passphrase: &str) -> Option<ScAddress> {

0 commit comments

Comments
 (0)