From 1720eeac8751cc9776955caa2a7324298e350773 Mon Sep 17 00:00:00 2001 From: fiftyeightandeight <443225+fiftyeightandeight@users.noreply.github.com> Date: Fri, 5 Nov 2021 19:46:33 +0800 Subject: [PATCH] changed decimals to zero and updating test-cases (#330) --- clarity/contracts/token/token-usda.clar | 2 +- clarity/contracts/token/token-wbtc.clar | 2 +- clarity/tests/flash-loan_test.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clarity/contracts/token/token-usda.clar b/clarity/contracts/token/token-usda.clar index 2f675f40..e54f1b70 100644 --- a/clarity/contracts/token/token-usda.clar +++ b/clarity/contracts/token/token-usda.clar @@ -37,7 +37,7 @@ ) (define-read-only (get-decimals) - (ok u2) + (ok u0) ) (define-read-only (get-balance (account principal)) diff --git a/clarity/contracts/token/token-wbtc.clar b/clarity/contracts/token/token-wbtc.clar index 4d7ac7b4..c92bab16 100644 --- a/clarity/contracts/token/token-wbtc.clar +++ b/clarity/contracts/token/token-wbtc.clar @@ -37,7 +37,7 @@ ) (define-read-only (get-decimals) - (ok u8) + (ok u0) ) (define-read-only (get-balance (account principal)) diff --git a/clarity/tests/flash-loan_test.ts b/clarity/tests/flash-loan_test.ts index f79b89d6..b9161517 100644 --- a/clarity/tests/flash-loan_test.ts +++ b/clarity/tests/flash-loan_test.ts @@ -29,7 +29,7 @@ const conversion_ltv = 0.95e+8 const bs_vol = 0.8e+8 const moving_average = 0.95e+8 -const wbtcPrice = 50000e+8 +const wbtcPrice = 50000 const weightX = 0.5e+8 const weightY = 0.5e+8 @@ -52,9 +52,9 @@ Clarinet.test({ let FLTest = new FLTestAgent1(chain, deployer); let call = await FLTest.getBalance(wbtcAddress, wallet_1.address); - let position:any = call.result.expectOk().expectUint(2000000000000); + let position:any = call.result.expectOk().expectUint(200000000000000000000); call = await FLTest.getBalance(usdaAddress, wallet_1.address); - position = call.result.expectOk().expectUint(200000000000); + position = call.result.expectOk().expectUint(20000000000000); let result = FWPTest.createPool(deployer, wbtcAddress, usdaAddress, weightX, weightY, fwpwbtcusdaAddress, multisigfwpAddress, Math.round(500000e+8 * ONE_8 / wbtcPrice), 500000e+8); result.expectOk().expectBool(true);