IncomingViewingKey inherits network when derived from FullViewingKey
This commit is contained in:
parent
5159046578
commit
86c3b69720
|
@ -447,8 +447,6 @@ pub struct IncomingViewingKey {
|
||||||
scalar: pallas::Scalar,
|
scalar: pallas::Scalar,
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: impl a From that accepts a Network?
|
|
||||||
|
|
||||||
impl fmt::Debug for IncomingViewingKey {
|
impl fmt::Debug for IncomingViewingKey {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
f.debug_tuple("IncomingViewingKey")
|
f.debug_tuple("IncomingViewingKey")
|
||||||
|
@ -493,8 +491,7 @@ impl From<FullViewingKey> for IncomingViewingKey {
|
||||||
);
|
);
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
// TODO: handle the network better, maybe an enum variant constraint?
|
network: fvk.network,
|
||||||
network: Network::default(),
|
|
||||||
// mod r_P
|
// mod r_P
|
||||||
scalar: pallas::Scalar::from_bytes(&commit_x.into()).unwrap(),
|
scalar: pallas::Scalar::from_bytes(&commit_x.into()).unwrap(),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue