Skip to content

Commit

Permalink
Some more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Nov 16, 2023
1 parent c1e988c commit b896a6c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions sdk/src/types/block/output/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,13 +533,13 @@ mod tests {
};

let builder = BasicOutput::build_with_amount(100)
.add_native_token(NativeToken::new(TokenId::from(foundry_id), 1000).unwrap())
.with_native_token(NativeToken::new(TokenId::from(foundry_id), 1000).unwrap())
.add_unlock_condition(address.clone())
.with_features(rand_allowed_features(BasicOutput::ALLOWED_FEATURES));
test_split_dto(builder);

let builder = BasicOutput::build_with_minimum_amount(protocol_parameters.storage_score_parameters())
.add_native_token(NativeToken::new(TokenId::from(foundry_id), 1000).unwrap())
.with_native_token(NativeToken::new(TokenId::from(foundry_id), 1000).unwrap())
.add_unlock_condition(address)
.with_features(rand_allowed_features(BasicOutput::ALLOWED_FEATURES));
test_split_dto(builder);
Expand Down
1 change: 1 addition & 0 deletions sdk/src/types/block/output/feature/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ impl StorageScore for Feature {
Self::Issuer(feature) => feature.storage_score(params),
Self::Metadata(feature) => feature.storage_score(params),
Self::Tag(feature) => feature.storage_score(params),
Self::NativeToken(feature) => feature.storage_score(params),
Self::BlockIssuer(feature) => feature.storage_score(params),
Self::Staking(feature) => feature.storage_score(params),
}
Expand Down
4 changes: 3 additions & 1 deletion sdk/src/types/block/output/feature/native_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use derive_more::{Deref, From};

use crate::types::block::output::NativeToken;
use crate::types::block::output::{NativeToken, StorageScore};

#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Deref, From, packable::Packable)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
Expand All @@ -23,3 +23,5 @@ impl NativeTokenFeature {
&self.0
}
}

impl StorageScore for NativeTokenFeature {}
2 changes: 0 additions & 2 deletions sdk/src/wallet/operations/output_claiming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@ where
.with_minimum_amount(storage_score_params)
.with_nft_id(nft_output.nft_id_non_null(&output_data.output_id))
.with_unlock_conditions([AddressUnlockCondition::new(wallet_address.clone())])
// Set native tokens empty, we will collect them from all inputs later
.with_native_tokens([])
.finish_output()?
};

Expand Down

0 comments on commit b896a6c

Please sign in to comment.