v0.2.5-pre.005-fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-wallet-lib/src/wallet.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
//! In-memory native Wallet V1 create/open orchestration.
|
||||
|
||||
@@ -263,7 +263,7 @@ pub async fn create_wallet_v1(
|
||||
let owner_slot =
|
||||
crate::WalletKeySlotV1::new(owner_slot_id, crate::WalletKeySlotRoleV1::Owner, owner_kdf, crate::WalletKeyWrapV1::new(owner_wrap_nonce, owner_wrapped));
|
||||
let view_descriptor = match view_slot.as_ref() {
|
||||
std::option::Option::Some(slot) => crate::WalletViewDescriptorV1::enabled(*slot.slot_id()),
|
||||
std::option::Option::Some(slot) => crate::WalletViewDescriptorV1::enabled_for_slot(*slot.slot_id()),
|
||||
std::option::Option::None => crate::WalletViewDescriptorV1::disabled(),
|
||||
};
|
||||
let owner_control = crate::WalletEncryptedCompartmentV1::new(crate::WalletCompartmentKindV1::OwnerControl, owner_control_nonce, owner_control_ciphertext);
|
||||
@@ -584,7 +584,7 @@ fn provisional_envelope(
|
||||
);
|
||||
let (view_descriptor, view_slot) = match view_material {
|
||||
std::option::Option::Some(material) => (
|
||||
crate::WalletViewDescriptorV1::enabled(material.slot_id),
|
||||
crate::WalletViewDescriptorV1::enabled_for_slot(material.slot_id),
|
||||
std::option::Option::Some(crate::WalletKeySlotV1::new(
|
||||
material.slot_id,
|
||||
crate::WalletKeySlotRoleV1::View,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-wallet-lib/src/wire.rs
|
||||
// version: 4
|
||||
// version: 5
|
||||
|
||||
//! Strict native `.kspwallet` V1 wire envelope.
|
||||
|
||||
@@ -273,7 +273,7 @@ impl WalletViewDescriptorV1 {
|
||||
return Self { enabled: false, slot_id: std::option::Option::None };
|
||||
}
|
||||
|
||||
pub(crate) const fn enabled(slot_id: [u8; crate::KSPWALLET_V1_SLOT_ID_BYTES]) -> Self {
|
||||
pub(crate) const fn enabled_for_slot(slot_id: [u8; crate::KSPWALLET_V1_SLOT_ID_BYTES]) -> Self {
|
||||
return Self { enabled: true, slot_id: std::option::Option::Some(slot_id) };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user