Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChewingGlass committed Dec 2, 2024
1 parent 4bf70de commit 39b3f67
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ pub fn handler(ctx: Context<IssueRewardsV0>, args: IssueRewardsArgsV0) -> Result
// This contract will be deployed between December 3 and December 4 at UTC midnight.
// That means this will emit payment from December 3 to August 1st, 2025 (because epochs are paid in arrears).
// This is a total of 241 days. 2.9M HNT / 241 days = 12033.19502075 HNT per day.
#[allow(clippy::inconsistent_digit_grouping)]
if epoch_curr_ts < 1754006400
&& ctx.accounts.dnt_mint.key()
== Pubkey::from_str("mb1eu7TzEc71KxDpsmsKoucSSuuoGLv1drys1oP2jh6").unwrap()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pub struct SwitchMobileOpsFund<'info> {
pub associated_token_program: Program<'info, AssociatedToken>,
}

#[allow(clippy::inconsistent_digit_grouping)]
pub fn handler(ctx: Context<SwitchMobileOpsFund>) -> Result<()> {
burn(
CpiContext::new(
Expand All @@ -66,7 +67,7 @@ pub fn handler(ctx: Context<SwitchMobileOpsFund>) -> Result<()> {
authority: ctx.accounts.authority.to_account_info(),
},
),
18_197_425_725,
18_197_425_725_000000,
)?;
mint_v0(
CpiContext::new_with_signer(
Expand Down
17 changes: 15 additions & 2 deletions tests/helium-sub-daos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,20 @@ describe("helium-sub-daos", () => {
pubkeys: { vetokenTracker: tracker },
} = await rewardsProgram.methods
.initializeVetokenTrackerV0({
votingRewardsTiers: [],
votingRewardsTiers: [
{
numVetokens: new anchor.BN(0),
percent: delegatorRewardsPercent(0),
},
{
numVetokens: new anchor.BN(10),
percent: delegatorRewardsPercent(50),
},
{
numVetokens: new anchor.BN(1000000000000000),
percent: delegatorRewardsPercent(100),
},
],
})
.accounts({
registrar: subDaoRegistrar,
Expand Down Expand Up @@ -960,7 +973,7 @@ describe("helium-sub-daos", () => {
);
expect(
vsrEpochInfoAcc.rewardsAmount.toString()
).to.eq((0.02 * SUB_DAO_EPOCH_REWARDS).toString());
).to.eq("0");

const acc = await program.account.subDaoEpochInfoV0.fetch(
subDaoEpochInfo
Expand Down

0 comments on commit 39b3f67

Please sign in to comment.