Skip to content

Commit 8223cc1

Browse files
fmt and lint
1 parent 7c33643 commit 8223cc1

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

  • sdk-libs/program-test/src/program_test

sdk-libs/program-test/src/program_test/rpc.rs

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -804,11 +804,8 @@ impl Rpc for LightProgramTest {
804804

805805
// For ATAs, use the wallet owner from the ata_owner_map
806806
let addr = addresses[original_idx];
807-
let wallet_owner = indexer
808-
.ata_owner_map
809-
.get(addr)
810-
.copied()
811-
.unwrap_or(*addr);
807+
let wallet_owner =
808+
indexer.ata_owner_map.get(addr).copied().unwrap_or(*addr);
812809
results[original_idx] = Some(AccountInterface::cold_token(
813810
*addr,
814811
compressed_token,
@@ -833,16 +830,10 @@ impl Rpc for LightProgramTest {
833830
let token_acc = items.into_iter().next().unwrap();
834831
// For ATAs, use the wallet owner from the ata_owner_map
835832
let addr = addresses[original_idx];
836-
let wallet_owner = indexer
837-
.ata_owner_map
838-
.get(addr)
839-
.copied()
840-
.unwrap_or(*addr);
841-
results[original_idx] = Some(AccountInterface::cold_token(
842-
*addr,
843-
token_acc,
844-
wallet_owner,
845-
));
833+
let wallet_owner =
834+
indexer.ata_owner_map.get(addr).copied().unwrap_or(*addr);
835+
results[original_idx] =
836+
Some(AccountInterface::cold_token(*addr, token_acc, wallet_owner));
846837
}
847838
}
848839
}

0 commit comments

Comments
 (0)