Skip to content

Commit

Permalink
fix: override block_id method of ConnectedAccount for SozoAccount
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda-0x committed Jul 5, 2024
1 parent e8539d5 commit cd47c9e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bin/sozo/src/commands/options/account/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use starknet::accounts::{
RawDeclaration, RawExecution, RawLegacyDeclaration, SingleOwnerAccount,
};
use starknet::core::types::contract::legacy::LegacyContractClass;
use starknet::core::types::{FieldElement, FlattenedSierraClass};
use starknet::core::types::{BlockId, FieldElement, FlattenedSierraClass};
use starknet::providers::Provider;
use starknet::signers::LocalWallet;

Expand Down Expand Up @@ -159,4 +159,12 @@ where
Self::Controller(account) => account.provider(),
}
}

fn block_id(&self) -> BlockId {
match self {
Self::Standard(account) => account.block_id(),

Check warning on line 165 in bin/sozo/src/commands/options/account/type.rs

View check run for this annotation

Codecov / codecov/patch

bin/sozo/src/commands/options/account/type.rs#L163-L165

Added lines #L163 - L165 were not covered by tests
#[cfg(feature = "controller")]
Self::Controller(account) => account.block_id(),

Check warning on line 167 in bin/sozo/src/commands/options/account/type.rs

View check run for this annotation

Codecov / codecov/patch

bin/sozo/src/commands/options/account/type.rs#L167

Added line #L167 was not covered by tests
}
}

Check warning on line 169 in bin/sozo/src/commands/options/account/type.rs

View check run for this annotation

Codecov / codecov/patch

bin/sozo/src/commands/options/account/type.rs#L169

Added line #L169 was not covered by tests
}

0 comments on commit cd47c9e

Please sign in to comment.