@@ -16,8 +16,8 @@ use polymesh_primitives::settlement::{InstructionId, Leg, SettlementType};
1616use polymesh_primitives:: {
1717 with_transaction, AuthorizationData , Claim , ClaimType , Condition , ConditionType , CountryCode ,
1818 IdentityId , NFTCollectionId , NFTCollectionKeys , NFTId , NFTMetadataAttribute , NFTs , PortfolioId ,
19- PortfolioKind , PortfolioNumber , PortfolioUpdateReason , Scope , Signatory , TrustedFor ,
20- TrustedIssuer , WeightMeter ,
19+ PortfolioKind , PortfolioName , PortfolioNumber , PortfolioUpdateReason , Scope , Signatory ,
20+ TrustedFor , TrustedIssuer , WeightMeter ,
2121} ;
2222use sp_keyring:: AccountKeyring ;
2323
@@ -506,11 +506,17 @@ fn burn_nft_no_custody() {
506506
507507 let bob: User = User :: new ( AccountKeyring :: Bob ) ;
508508 let alice: User = User :: new ( AccountKeyring :: Alice ) ;
509+ let portfolio_kind = PortfolioKind :: User ( PortfolioNumber ( 1 ) ) ;
510+ let portfolio_id = PortfolioId :: new ( alice. did , portfolio_kind) ;
509511
510- let portfolio_id = PortfolioId :: new ( alice. did , PortfolioKind :: Default ) ;
511512 let collection_keys: NFTCollectionKeys =
512513 vec ! [ AssetMetadataKey :: Local ( AssetMetadataLocalKey ( 1 ) ) ] . into ( ) ;
513514
515+ assert_ok ! ( Portfolio :: create_portfolio(
516+ alice. origin( ) ,
517+ PortfolioName ( b"AliceUserPortfolio" . to_vec( ) )
518+ ) ) ;
519+
514520 let asset_id = create_nft_collection (
515521 alice. clone ( ) ,
516522 AssetType :: NonFungible ( NonFungibleType :: Derivative ) ,
@@ -537,18 +543,12 @@ fn burn_nft_no_custody() {
537543 key: AssetMetadataKey :: Local ( AssetMetadataLocalKey ( 1 ) ) ,
538544 value: AssetMetadataValue ( b"test" . to_vec( ) ) ,
539545 } ] ,
540- PortfolioKind :: Default ,
546+ portfolio_kind ,
541547 )
542548 . unwrap ( ) ;
543549
544550 assert_noop ! (
545- NFT :: redeem_nft(
546- alice. origin( ) ,
547- asset_id,
548- NFTId ( 1 ) ,
549- PortfolioKind :: Default ,
550- None
551- ) ,
551+ NFT :: redeem_nft( alice. origin( ) , asset_id, NFTId ( 1 ) , portfolio_kind, None ) ,
552552 PortfolioError :: UnauthorizedCustodian
553553 ) ;
554554 } ) ;
0 commit comments