@@ -17,7 +17,8 @@ fn client_add_asset_quantity_to_existing_asset_should_increase_asset_amount() ->
1717 // Given
1818 let account_id = AccountId :: from_str ( "alice@wonderland" ) . expect ( "Valid" ) ;
1919 let asset_definition_id = AssetDefinitionId :: from_str ( "xor#wonderland" ) . expect ( "Valid" ) ;
20- let create_asset = RegisterBox :: new ( AssetDefinition :: new_quantity ( asset_definition_id. clone ( ) ) ) ;
20+ let create_asset =
21+ RegisterBox :: new ( AssetDefinition :: quantity ( asset_definition_id. clone ( ) ) . build ( ) ) ;
2122 let metadata = iroha_data_model:: metadata:: UnlimitedMetadata :: default ( ) ;
2223 //When
2324 let quantity: u32 = 200 ;
@@ -48,9 +49,8 @@ fn client_add_big_asset_quantity_to_existing_asset_should_increase_asset_amount(
4849 // Given
4950 let account_id = AccountId :: from_str ( "alice@wonderland" ) . expect ( "Valid" ) ;
5051 let asset_definition_id = AssetDefinitionId :: from_str ( "xor#wonderland" ) . expect ( "Valid" ) ;
51- let create_asset = RegisterBox :: new ( AssetDefinition :: new_big_quantity (
52- asset_definition_id. clone ( ) ,
53- ) ) ;
52+ let create_asset =
53+ RegisterBox :: new ( AssetDefinition :: big_quantity ( asset_definition_id. clone ( ) ) . build ( ) ) ;
5454 let metadata = iroha_data_model:: metadata:: UnlimitedMetadata :: default ( ) ;
5555 //When
5656 let quantity: u128 = 2_u128 . pow ( 65 ) ;
@@ -80,7 +80,7 @@ fn client_add_asset_with_decimal_should_increase_asset_amount() -> Result<()> {
8080 // Given
8181 let account_id = AccountId :: from_str ( "alice@wonderland" ) . expect ( "Valid" ) ;
8282 let asset_definition_id = AssetDefinitionId :: from_str ( "xor#wonderland" ) . expect ( "Valid" ) ;
83- let identifiable_box = AssetDefinition :: new_fixed_precision ( asset_definition_id. clone ( ) ) ;
83+ let identifiable_box = AssetDefinition :: fixed ( asset_definition_id. clone ( ) ) . build ( ) ;
8484 let create_asset = RegisterBox :: new ( identifiable_box) ;
8585 let metadata = iroha_data_model:: metadata:: UnlimitedMetadata :: default ( ) ;
8686
@@ -132,18 +132,16 @@ fn client_add_asset_with_name_length_more_than_limit_should_not_commit_transacti
132132
133133 // Given
134134 let normal_asset_definition_id = AssetDefinitionId :: from_str ( "xor#wonderland" ) . expect ( "Valid" ) ;
135- let create_asset = RegisterBox :: new ( AssetDefinition :: new_quantity (
136- normal_asset_definition_id. clone ( ) ,
137- ) ) ;
135+ let create_asset =
136+ RegisterBox :: new ( AssetDefinition :: quantity ( normal_asset_definition_id. clone ( ) ) . build ( ) ) ;
138137 test_client. submit ( create_asset) ?;
139138 iroha_logger:: info!( "Creating asset" ) ;
140139
141140 let too_long_asset_name = "0" . repeat ( 2_usize . pow ( 14 ) ) ;
142141 let incorrect_asset_definition_id =
143142 AssetDefinitionId :: from_str ( & ( too_long_asset_name + "#wonderland" ) ) . expect ( "Valid" ) ;
144- let create_asset = RegisterBox :: new ( AssetDefinition :: new_quantity (
145- incorrect_asset_definition_id. clone ( ) ,
146- ) ) ;
143+ let create_asset =
144+ RegisterBox :: new ( AssetDefinition :: quantity ( incorrect_asset_definition_id. clone ( ) ) . build ( ) ) ;
147145
148146 test_client. submit ( create_asset) ?;
149147 iroha_logger:: info!( "Creating another asset" ) ;
0 commit comments