Skip to content

Commit 16ddaf3

Browse files
committed
cleanup
1 parent 1d77d6d commit 16ddaf3

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

crates/apps_lib/src/client/rpc.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ use namada_sdk::rpc::{
4747
};
4848
use namada_sdk::storage::BlockResults;
4949
use 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+
};
5153
use namada_sdk::tx::display_batch_resp;
5254
use namada_sdk::wallet::AddressVpType;
5355
use 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
}

crates/tests/src/integration/masp.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)