Skip to content

Commit 9756fb0

Browse files
committed
feat: simplify to_addr implementation
1 parent d7df7c9 commit 9756fb0

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

stackslib/src/core/test_util.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,7 @@ pub fn make_contract_publish_microblock_only(
266266
}
267267

268268
pub fn to_addr(sk: &StacksPrivateKey) -> StacksAddress {
269-
StacksAddress::from_public_keys(
270-
C32_ADDRESS_VERSION_TESTNET_SINGLESIG,
271-
&AddressHashMode::SerializeP2PKH,
272-
1,
273-
&vec![StacksPublicKey::from_private(sk)],
274-
)
275-
.unwrap()
269+
StacksAddress::p2pkh(false, &StacksPublicKey::from_private(sk))
276270
}
277271

278272
pub fn make_stacks_transfer(

0 commit comments

Comments
 (0)