Skip to content

Commit

Permalink
[substrate-apply] precompile-bioauth:mock,pallet-bioauth:testing Cryp…
Browse files Browse the repository at this point in the history
…to Pair trait refactory (#13657)
  • Loading branch information
dmitrylavrenov committed Feb 7, 2024
1 parent 039b419 commit 04baa4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions crates/pallet-bioauth/src/mock/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use mockall::{mock, predicate};
use scale_info::TypeInfo;
#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};
use sp_core::{crypto::Infallible, H256};
use sp_core::{crypto::DeriveError, H256};
use sp_runtime::{
testing::Header,
traits::{BlakeTwo256, IdentityLookup},
Expand Down Expand Up @@ -52,7 +52,7 @@ impl AsRef<[u8]> for MockOpaqueAuthTicket {
pub struct MockAuthTicketConverter;

impl TryConvert<MockOpaqueAuthTicket, AuthTicket<ValidatorPublicKey>> for MockAuthTicketConverter {
type Error = Infallible;
type Error = DeriveError;

fn try_convert(
value: MockOpaqueAuthTicket,
Expand All @@ -75,7 +75,7 @@ impl Default for MockVerifier {
}

impl crate::Verifier<Vec<u8>> for MockVerifier {
type Error = Infallible;
type Error = DeriveError;

fn verify<'a, D>(&self, _data: D, signature: Vec<u8>) -> Result<bool, Self::Error>
where
Expand Down
6 changes: 3 additions & 3 deletions crates/precompile-bioauth/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use pallet_bioauth::{AuthTicket, TryConvert};
use scale_info::TypeInfo;
#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};
use sp_core::{crypto::Infallible, H256};
use sp_core::{crypto::DeriveError, H256};
use sp_runtime::{
testing::Header,
traits::{BlakeTwo256, IdentityLookup},
Expand Down Expand Up @@ -61,7 +61,7 @@ impl From<Vec<u8>> for MockOpaqueAuthTicket {
pub struct MockAuthTicketConverter;

impl TryConvert<MockOpaqueAuthTicket, AuthTicket<ValidatorPublicKey>> for MockAuthTicketConverter {
type Error = Infallible;
type Error = DeriveError;

fn try_convert(
value: MockOpaqueAuthTicket,
Expand All @@ -75,7 +75,7 @@ impl TryConvert<MockOpaqueAuthTicket, AuthTicket<ValidatorPublicKey>> for MockAu
pub struct MockVerifier;

impl pallet_bioauth::Verifier<Vec<u8>> for MockVerifier {
type Error = Infallible;
type Error = DeriveError;

fn verify<'a, D>(&self, _data: D, _signature: Vec<u8>) -> Result<bool, Self::Error>
where
Expand Down

0 comments on commit 04baa4c

Please sign in to comment.