Skip to content

Commit

Permalink
ok_or_else
Browse files Browse the repository at this point in the history
  • Loading branch information
alinush committed Jan 18, 2024
1 parent b5b7d43 commit ae17a87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aptos-move/aptos-vm/src/zkid_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use aptos_vm_logging::log_schema::AdapterLogSchema;
use move_core_types::{language_storage::CORE_CODE_ADDRESS, move_resource::MoveStructType};

fn get_current_time_onchain(resolver: &impl AptosMoveResolver) -> Result<CurrentTimeMicroseconds, VMStatus> {
CurrentTimeMicroseconds::fetch_config(resolver).ok_or(VMStatus::error(StatusCode::VALUE_DESERIALIZATION_ERROR, Some("could not fetch CurrentTimeMicroseconds on-chain config".to_string())))
CurrentTimeMicroseconds::fetch_config(resolver).ok_or_else(VMStatus::error(StatusCode::VALUE_DESERIALIZATION_ERROR, Some("could not fetch CurrentTimeMicroseconds on-chain config".to_string())))
}

fn get_jwks_onchain(resolver: &impl AptosMoveResolver) -> Result<PatchedJWKs> {
Expand Down
2 changes: 1 addition & 1 deletion types/src/zkid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl OpenIdSig {
&self.pepper
)?
.eq(&pk.idc),
"Address seed verification failed"
"Address IDC verification failed"
);

ensure!(
Expand Down

0 comments on commit ae17a87

Please sign in to comment.