@@ -98,6 +98,7 @@ use walrus_sui::{
9898 SuiContractClient ,
9999 retry_client:: { RetriableSuiClient , retriable_sui_client:: LazySuiClientBuilder } ,
100100 } ,
101+ coin:: Coin ,
101102 config:: WalletConfig ,
102103 test_utils:: { self , fund_addresses, wallet_for_testing} ,
103104 types:: {
@@ -2527,19 +2528,19 @@ pub async fn test_select_coins_max_objects() -> TestResult {
25272528 ExponentialBackoffConfig :: default ( ) ,
25282529 ) ?;
25292530
2530- let balance = retry_client. get_balance ( address, None ) . await ?;
2531- assert_eq ! ( balance. total_balance , u128 :: from ( sui( 4 ) ) ) ;
2531+ let balance = retry_client. get_total_balance ( address, Coin :: SUI ) . await ?;
2532+ assert_eq ! ( balance, sui( 4 ) ) ;
25322533
25332534 // The maximum number of coins that can be selected to reach the amount.
25342535 let max_num_coins = 2 ;
25352536
25362537 let result = retry_client
2537- . select_coins ( address, None , sui ( 1 ) . into ( ) , vec ! [ ] , max_num_coins)
2538+ . select_coins ( address, Coin :: SUI , sui ( 1 ) . into ( ) , vec ! [ ] , max_num_coins)
25382539 . await ;
25392540 assert ! ( result. is_ok( ) , "1 SUI can be constructed with <= 2 coins" ) ;
25402541
25412542 let result = retry_client
2542- . select_coins ( address, None , sui ( 3 ) . into ( ) , vec ! [ ] , max_num_coins)
2543+ . select_coins ( address, Coin :: SUI , sui ( 3 ) . into ( ) , vec ! [ ] , max_num_coins)
25432544 . await ;
25442545 if let Err ( error) = result {
25452546 assert ! (
@@ -2551,7 +2552,7 @@ pub async fn test_select_coins_max_objects() -> TestResult {
25512552 }
25522553
25532554 let result = retry_client
2554- . select_coins ( address, None , sui ( 5 ) . into ( ) , vec ! [ ] , max_num_coins)
2555+ . select_coins ( address, Coin :: SUI , sui ( 5 ) . into ( ) , vec ! [ ] , max_num_coins)
25552556 . await ;
25562557 if let Err ( error) = result {
25572558 assert ! (
@@ -2796,10 +2797,9 @@ async fn test_store_with_upload_relay_with_tip() {
27962797
27972798 // Get initial balance of relay wallet to verify tip payment
27982799 let initial_relay_balance = retry_client
2799- . get_balance ( relay_address, None )
2800+ . get_total_balance ( relay_address, Coin :: SUI )
28002801 . await
2801- . expect ( "get balance" )
2802- . total_balance ;
2802+ . expect ( "get balance" ) ;
28032803
28042804 const BLOB_SIZE : usize = 40000 ;
28052805 match basic_store_and_read (
@@ -2819,10 +2819,9 @@ async fn test_store_with_upload_relay_with_tip() {
28192819
28202820 // Verify that the relay wallet received a tip
28212821 let final_relay_balance = retry_client
2822- . get_balance ( relay_address, None )
2822+ . get_total_balance ( relay_address, Coin :: SUI )
28232823 . await
2824- . expect ( "get balance" )
2825- . total_balance ;
2824+ . expect ( "get balance" ) ;
28262825
28272826 tracing:: info!(
28282827 "Relay address balance - Initial: {initial_relay_balance}, Final: {final_relay_balance}" ,
@@ -2839,8 +2838,7 @@ async fn test_store_with_upload_relay_with_tip() {
28392838 encoded_blob_length_for_n_shards ( n_shards, BLOB_SIZE as u64 , EncodingType :: RS2 )
28402839 . expect ( "encoded blob size should be valid" ) ;
28412840
2842- let expected_tip_lower_bound =
2843- u128:: from ( TIP_BASE + encoded_blob_size. div_ceil ( 1024 ) * TIP_MULTIPLIER ) ;
2841+ let expected_tip_lower_bound = TIP_BASE + encoded_blob_size. div_ceil ( 1024 ) * TIP_MULTIPLIER ;
28442842 let actual_tip = final_relay_balance - initial_relay_balance;
28452843
28462844 tracing:: info!(
0 commit comments