@@ -52,19 +52,19 @@ pub const VALIDATOR_SIGNING_INFO_HEX_RESPONSE: &str = "0a34636f736d6f7376616c636
5252fn test_balance_reconstruct ( ) {
5353 struct TestCase {
5454 addr : String ,
55- coins : Vec < ( String , Uint128 ) > ,
55+ coins : Vec < ( String , Uint256 ) > ,
5656 }
5757 let test_cases: Vec < TestCase > = vec ! [
5858 TestCase {
5959 addr: "osmo1yz54ncxj9csp7un3xled03q6thrrhy9cztkfzs" . to_string( ) ,
60- coins: vec![ ( "uosmo" . to_string( ) , Uint128 :: from( 100u128 ) ) ] ,
60+ coins: vec![ ( "uosmo" . to_string( ) , Uint256 :: from( 100u128 ) ) ] ,
6161 } ,
6262 TestCase {
6363 addr: "osmo1yz54ncxj9csp7un3xled03q6thrrhy9cztkfzs" . to_string( ) ,
6464 coins: vec![
65- ( "uosmo" . to_string( ) , Uint128 :: from( 100u128 ) ) ,
66- ( "uatom" . to_string( ) , Uint128 :: from( 500u128 ) ) ,
67- ( "uluna" . to_string( ) , Uint128 :: from( 80u128 ) ) ,
65+ ( "uosmo" . to_string( ) , Uint256 :: from( 100u128 ) ) ,
66+ ( "uatom" . to_string( ) , Uint256 :: from( 500u128 ) ) ,
67+ ( "uluna" . to_string( ) , Uint256 :: from( 80u128 ) ) ,
6868 ] ,
6969 } ,
7070 TestCase {
@@ -98,7 +98,7 @@ fn test_balance_reconstruct() {
9898 assert_eq ! ( balances. coins. len( ) , ts. coins. len( ) ) ;
9999 for ( i, coin) in balances. coins . iter ( ) . enumerate ( ) {
100100 assert_eq ! ( coin. denom, ts. coins[ i] . 0 ) ;
101- assert_eq ! ( coin. amount, Uint256 :: from ( ts. coins[ i] . 1 ) )
101+ assert_eq ! ( coin. amount, ts. coins[ i] . 1 ) ;
102102 }
103103 }
104104}
@@ -155,7 +155,7 @@ fn test_bank_total_supply_reconstruct() {
155155 assert_eq ! ( coin. denom, ts. values[ i] . denom) ;
156156 assert_eq ! (
157157 coin. amount,
158- Uint256 :: from ( Uint128 :: from_str( ts. values[ i] . amount. as_str( ) ) . unwrap( ) )
158+ Uint256 :: from_str( ts. values[ i] . amount. as_str( ) ) . unwrap( )
159159 )
160160 }
161161 }
@@ -787,17 +787,17 @@ fn test_proposal_votes_reconstruct() {
787787#[ test]
788788fn test_fee_pool_reconstruct ( ) {
789789 struct TestCase {
790- coins : Vec < ( String , Uint128 ) > ,
790+ coins : Vec < ( String , Uint256 ) > ,
791791 }
792792 let test_cases: Vec < TestCase > = vec ! [
793793 TestCase {
794- coins: vec![ ( "uosmo" . to_string( ) , Uint128 :: from( 100u128 ) ) ] ,
794+ coins: vec![ ( "uosmo" . to_string( ) , Uint256 :: from( 100u128 ) ) ] ,
795795 } ,
796796 TestCase {
797797 coins: vec![
798- ( "uosmo" . to_string( ) , Uint128 :: from( 100u128 ) ) ,
799- ( "uatom" . to_string( ) , Uint128 :: from( 500u128 ) ) ,
800- ( "uluna" . to_string( ) , Uint128 :: from( 80u128 ) ) ,
798+ ( "uosmo" . to_string( ) , Uint256 :: from( 100u128 ) ) ,
799+ ( "uatom" . to_string( ) , Uint256 :: from( 500u128 ) ) ,
800+ ( "uluna" . to_string( ) , Uint256 :: from( 80u128 ) ) ,
801801 ] ,
802802 } ,
803803 TestCase { coins: vec![ ] } ,
@@ -811,7 +811,7 @@ fn test_fee_pool_reconstruct() {
811811 denom : coin. 0 . clone ( ) ,
812812 amount : coin
813813 . 1
814- . mul ( Uint128 :: one ( ) . mul ( Uint128 :: from ( 10u64 ) . pow ( DECIMAL_PLACES ) ) ) // adjust to Dec gogo proto format
814+ . mul ( Uint256 :: one ( ) . mul ( Uint256 :: from ( 10u64 ) . pow ( DECIMAL_PLACES ) ) ) // adjust to Dec gogo proto format
815815 . to_string ( ) ,
816816 } ;
817817
@@ -835,7 +835,7 @@ fn test_fee_pool_reconstruct() {
835835 assert_eq ! ( fee_pool_coins. coins. len( ) , ts. coins. len( ) ) ;
836836 for ( i, coin) in fee_pool_coins. coins . iter ( ) . enumerate ( ) {
837837 assert_eq ! ( coin. denom, ts. coins[ i] . 0 ) ;
838- assert_eq ! ( coin. amount, Uint256 :: from ( ts. coins[ i] . 1 ) )
838+ assert_eq ! ( coin. amount, ts. coins[ i] . 1 )
839839 }
840840 }
841841}
0 commit comments