From b821e7651fa1ca8ae02b250ce94fb8c464dc7057 Mon Sep 17 00:00:00 2001 From: toblich Date: Fri, 13 Dec 2024 00:03:03 -0300 Subject: [PATCH] Fix confusing XOR operator when exponentiation was meant --- content/courses/onchain-development/anchor-cpi.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/courses/onchain-development/anchor-cpi.md b/content/courses/onchain-development/anchor-cpi.md index 83286aebd..99edce357 100644 --- a/content/courses/onchain-development/anchor-cpi.md +++ b/content/courses/onchain-development/anchor-cpi.md @@ -575,7 +575,7 @@ pub fn add_movie_review( &[ctx.bumps.mint] ]] ), - 10*10^6 + 10 * 10u64.pow(6) )?; msg!("Minted tokens"); @@ -705,7 +705,7 @@ it("Movie review is added`", async () => { ); const userAta = await getAccount(provider.connection, tokenAccount); - expect(Number(userAta.amount)).to.equal((10 * 10) ^ 6); + expect(Number(userAta.amount)).to.equal(10 * Math.pow(10, 6)); }); ```