Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M committed Jan 11, 2024
1 parent c27bb49 commit 95709a7
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions sdk/tests/wallet/native_tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

use iota_sdk::{
types::block::output::feature::MetadataFeature,
wallet::{CreateNativeTokenParams, Result, SyncOptions},
U256,
};
Expand Down Expand Up @@ -86,15 +87,15 @@ async fn native_token_foundry_metadata() -> Result<()> {
.await?;
wallet.sync(None).await?;

let foundry_metadata = [1, 3, 3, 7];
let foundry_metadata = MetadataFeature::new([(vec![1, 3], vec![3, 7])])?;

let create_tx = wallet
.create_native_token(
CreateNativeTokenParams {
account_id: None,
circulating_supply: U256::from(50),
maximum_supply: U256::from(100),
foundry_metadata: Some(foundry_metadata.to_vec()),
foundry_metadata: Some(foundry_metadata.clone()),
},
None,
)
Expand All @@ -119,12 +120,8 @@ async fn native_token_foundry_metadata() -> Result<()> {
.unwrap()
.metadata()
.as_ref()
.unwrap()
.data()
.get(&packable::prefix::BoxedSlicePrefix::try_from(b"foundry".to_vec().into_boxed_slice()).unwrap())
.unwrap()
.to_vec(),
foundry_metadata.to_vec()
.unwrap(),
&foundry_metadata
);

tear_down(storage_path)
Expand Down

0 comments on commit 95709a7

Please sign in to comment.