Skip to content

Commit d1a0815

Browse files
committed
Merge branch 'wh/wallet-signer' of github.com:hyperware-ai/process_lib into wh/wallet-signer
2 parents 9bb25e5 + ae41238 commit d1a0815

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

src/wallet.rs

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ sol! {
4040
bytes paymasterAndData;
4141
bytes signature;
4242
}
43-
43+
4444
// v0.8 UserOperation struct with packed fields
4545
#[derive(Debug, Default, PartialEq, Eq)]
4646
struct PackedUserOperation {
@@ -2331,7 +2331,7 @@ impl UserOperationBuilder {
23312331

23322332
// Set the signature
23332333
packed_op.signature = Bytes::from(signature);
2334-
2334+
23352335
Ok(packed_op)
23362336
}
23372337

@@ -2484,29 +2484,24 @@ fn pack_gas_values(high: U256, low: U256) -> B256 {
24842484
// Take the lower 16 bytes of each value
24852485
let high_bytes = high.to_be_bytes::<32>();
24862486
let low_bytes = low.to_be_bytes::<32>();
2487-
2487+
24882488
// Pack high value in first 16 bytes
24892489
packed[0..16].copy_from_slice(&high_bytes[16..32]);
24902490
// Pack low value in last 16 bytes
24912491
packed[16..32].copy_from_slice(&low_bytes[16..32]);
2492-
2492+
24932493
B256::from(packed)
24942494
}
24952495

24962496
/// Build a v0.8 PackedUserOperation from the builder values
24972497
pub fn build_packed_user_operation(builder: &UserOperationBuilder) -> PackedUserOperation {
24982498
// Pack gas limits: verificationGasLimit (high) and callGasLimit (low)
2499-
let account_gas_limits = pack_gas_values(
2500-
builder.verification_gas_limit,
2501-
builder.call_gas_limit
2502-
);
2503-
2499+
let account_gas_limits =
2500+
pack_gas_values(builder.verification_gas_limit, builder.call_gas_limit);
2501+
25042502
// Pack gas fees: maxPriorityFeePerGas (high) and maxFeePerGas (low)
2505-
let gas_fees = pack_gas_values(
2506-
builder.max_priority_fee_per_gas,
2507-
builder.max_fee_per_gas
2508-
);
2509-
2503+
let gas_fees = pack_gas_values(builder.max_priority_fee_per_gas, builder.max_fee_per_gas);
2504+
25102505
PackedUserOperation {
25112506
sender: builder.sender,
25122507
nonce: builder.nonce,

0 commit comments

Comments
 (0)