Skip to content

Commit

Permalink
Review suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M committed Dec 4, 2023
1 parent 7120aaf commit 41a545c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sdk/src/types/block/output/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use crate::types::block::{
},
protocol::{ProtocolParameters, WorkScore, WorkScoreParameters},
semantic::{SemanticValidationContext, TransactionFailureReason},
slot::SlotIndex,
unlock::Unlock,
Error,
};
Expand Down Expand Up @@ -338,7 +339,7 @@ impl BasicOutput {
.locked_address(
self.address(),
// Safe to unwrap, we return an error before if its required but None
slot_index.unwrap_or_else(|| 0.into()),
slot_index.unwrap_or(SlotIndex(0)),
context.protocol_parameters.min_committable_age(),
context.protocol_parameters.max_committable_age(),
)
Expand Down
3 changes: 2 additions & 1 deletion sdk/src/types/block/output/nft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use crate::types::block::{
payload::signed_transaction::TransactionCapabilityFlag,
protocol::{ProtocolParameters, WorkScore, WorkScoreParameters},
semantic::{SemanticValidationContext, TransactionFailureReason},
slot::SlotIndex,
unlock::Unlock,
Error,
};
Expand Down Expand Up @@ -433,7 +434,7 @@ impl NftOutput {
.locked_address(
self.address(),
// Safe to unwrap, we return an error before if its required but None
slot_index.unwrap_or_else(|| 0.into()),
slot_index.unwrap_or(SlotIndex(0)),
context.protocol_parameters.min_committable_age(),
context.protocol_parameters.max_committable_age(),
)
Expand Down

0 comments on commit 41a545c

Please sign in to comment.