File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,9 @@ use namada_sdk::rpc::{
4747} ;
4848use namada_sdk:: storage:: BlockResults ;
4949use namada_sdk:: tendermint_rpc:: endpoint:: status;
50- use namada_sdk:: token:: { DenominatedAmount , MaspDigitPos } ;
50+ use namada_sdk:: token:: {
51+ DenominatedAmount , MaspDigitPos , NATIVE_MAX_DECIMAL_PLACES ,
52+ } ;
5153use namada_sdk:: tx:: display_batch_resp;
5254use namada_sdk:: wallet:: AddressVpType ;
5355use namada_sdk:: { error, state as storage, token, Namada } ;
@@ -372,11 +374,13 @@ pub async fn query_rewards_estimate(
372374 . await
373375 . unwrap ( )
374376 . unsigned_abs ( ) ;
375- let rewards_estimate =
376- DenominatedAmount :: new ( Amount :: from_u128 ( rewards_estimate) , 6 . into ( ) ) ;
377+ let rewards_estimate = DenominatedAmount :: new (
378+ Amount :: from_u128 ( rewards_estimate) ,
379+ NATIVE_MAX_DECIMAL_PLACES . into ( ) ,
380+ ) ;
377381 display_line ! (
378382 context. io( ) ,
379- "Estimated nam rewards for the next MASP epoch: {}" ,
383+ "Estimated native token rewards for the next MASP epoch: {}" ,
380384 rewards_estimate
381385 ) ;
382386}
Original file line number Diff line number Diff line change @@ -1364,7 +1364,9 @@ fn masp_incentives() -> Result<()> {
13641364 } ) ;
13651365 assert ! ( captured. result. is_ok( ) ) ;
13661366 assert ! (
1367- captured. contains( "Estimated nam rewards for the next MASP epoch: 0" )
1367+ captured. contains(
1368+ "Estimated native token rewards for the next MASP epoch: 0"
1369+ )
13681370 ) ;
13691371
13701372 // Wait till epoch boundary
@@ -1432,10 +1434,9 @@ fn masp_incentives() -> Result<()> {
14321434 } ) ;
14331435 assert ! ( captured. result. is_ok( ) ) ;
14341436 // note that 0.126 = 2 * 0.063 which is expected
1435- assert ! (
1436- captured
1437- . contains( "Estimated nam rewards for the next MASP epoch: 0.126" )
1438- ) ;
1437+ assert ! ( captured. contains(
1438+ "Estimated native token rewards for the next MASP epoch: 0.126"
1439+ ) ) ;
14391440
14401441 // Assert NAM balance at MASP pool is exclusively the
14411442 // rewards from the shielded BTC
You can’t perform that action at this time.
0 commit comments