-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
970 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
node_modules | ||
coverage | ||
packages/utils/coverage/lcov-report | ||
dist | ||
|
||
.umi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,282 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<coverage generated="1722242520703" clover="3.2.0"> | ||
<project timestamp="1722242520704" name="All files"> | ||
<metrics statements="192" coveredstatements="185" conditionals="182" coveredconditionals="159" methods="34" coveredmethods="34" elements="408" coveredelements="378" complexity="0" loc="192" ncloc="192" packages="6" files="22" classes="22"/> | ||
<package name="address"> | ||
<metrics statements="25" coveredstatements="25" conditionals="20" coveredconditionals="18" methods="3" coveredmethods="3"/> | ||
<file name="addPrefixSuffix.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/address/addPrefixSuffix.ts"> | ||
<metrics statements="9" coveredstatements="9" conditionals="8" coveredconditionals="6" methods="1" coveredmethods="1"/> | ||
<line num="2" count="5" type="cond" truecount="2" falsecount="0"/> | ||
<line num="3" count="4" type="stmt"/> | ||
<line num="4" count="4" type="stmt"/> | ||
<line num="5" count="4" type="cond" truecount="2" falsecount="0"/> | ||
<line num="6" count="4" type="cond" truecount="1" falsecount="1"/> | ||
<line num="7" count="4" type="stmt"/> | ||
<line num="9" count="4" type="cond" truecount="1" falsecount="1"/> | ||
<line num="10" count="4" type="stmt"/> | ||
<line num="12" count="4" type="stmt"/> | ||
</file> | ||
<file name="decodeAddress.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/address/decodeAddress.ts"> | ||
<metrics statements="12" coveredstatements="12" conditionals="8" coveredconditionals="8" methods="1" coveredmethods="1"/> | ||
<line num="2" count="1" type="stmt"/> | ||
<line num="3" count="6" type="stmt"/> | ||
<line num="4" count="6" type="cond" truecount="2" falsecount="0"/> | ||
<line num="5" count="5" type="cond" truecount="2" falsecount="0"/> | ||
<line num="6" count="4" type="cond" truecount="2" falsecount="0"/> | ||
<line num="7" count="2" type="stmt"/> | ||
<line num="8" count="2" type="cond" truecount="2" falsecount="0"/> | ||
<line num="10" count="1" type="stmt"/> | ||
<line num="11" count="1" type="stmt"/> | ||
<line num="13" count="2" type="stmt"/> | ||
<line num="15" count="2" type="stmt"/> | ||
<line num="17" count="1" type="stmt"/> | ||
</file> | ||
<file name="getOriginalAddress.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/address/getOriginalAddress.ts"> | ||
<metrics statements="4" coveredstatements="4" conditionals="4" coveredconditionals="4" methods="1" coveredmethods="1"/> | ||
<line num="2" count="6" type="cond" truecount="2" falsecount="0"/> | ||
<line num="3" count="4" type="cond" truecount="2" falsecount="0"/> | ||
<line num="4" count="1" type="stmt"/> | ||
<line num="6" count="3" type="stmt"/> | ||
</file> | ||
</package> | ||
<package name="calculate"> | ||
<metrics statements="12" coveredstatements="12" conditionals="26" coveredconditionals="26" methods="2" coveredmethods="2"/> | ||
<file name="divDecimals.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/calculate/divDecimals.ts"> | ||
<metrics statements="6" coveredstatements="6" conditionals="13" coveredconditionals="13" methods="1" coveredmethods="1"/> | ||
<line num="4" count="8" type="cond" truecount="2" falsecount="0"/> | ||
<line num="5" count="5" type="cond" truecount="2" falsecount="0"/> | ||
<line num="6" count="5" type="cond" truecount="4" falsecount="0"/> | ||
<line num="7" count="4" type="cond" truecount="4" falsecount="0"/> | ||
<line num="8" count="1" type="stmt"/> | ||
<line num="10" count="3" type="stmt"/> | ||
</file> | ||
<file name="index.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/calculate/index.ts"> | ||
<metrics statements="0" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/> | ||
</file> | ||
<file name="timesDecimals.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/calculate/timesDecimals.ts"> | ||
<metrics statements="6" coveredstatements="6" conditionals="13" coveredconditionals="13" methods="1" coveredmethods="1"/> | ||
<line num="4" count="11" type="cond" truecount="2" falsecount="0"/> | ||
<line num="5" count="8" type="cond" truecount="2" falsecount="0"/> | ||
<line num="6" count="8" type="cond" truecount="4" falsecount="0"/> | ||
<line num="7" count="6" type="cond" truecount="4" falsecount="0"/> | ||
<line num="8" count="1" type="stmt"/> | ||
<line num="10" count="5" type="stmt"/> | ||
</file> | ||
</package> | ||
<package name="contract"> | ||
<metrics statements="66" coveredstatements="65" conditionals="27" coveredconditionals="21" methods="9" coveredmethods="9"/> | ||
<file name="getRawTransaction.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/contract/getRawTransaction.ts"> | ||
<metrics statements="17" coveredstatements="17" conditionals="13" coveredconditionals="9" methods="1" coveredmethods="1"/> | ||
<line num="16" count="1" type="stmt"/> | ||
<line num="25" count="5" type="cond" truecount="2" falsecount="0"/> | ||
<line num="27" count="4" type="stmt"/> | ||
<line num="29" count="4" type="stmt"/> | ||
<line num="30" count="4" type="cond" truecount="3" falsecount="0"/> | ||
<line num="32" count="1" type="cond" truecount="1" falsecount="1"/> | ||
<line num="33" count="1" type="stmt"/> | ||
<line num="42" count="1" type="stmt"/> | ||
<line num="44" count="2" type="cond" truecount="1" falsecount="1"/> | ||
<line num="45" count="2" type="stmt"/> | ||
<line num="53" count="1" type="stmt"/> | ||
<line num="55" count="1" type="cond" truecount="1" falsecount="1"/> | ||
<line num="56" count="1" type="stmt"/> | ||
<line num="63" count="1" type="stmt"/> | ||
<line num="66" count="3" type="stmt"/> | ||
<line num="68" count="1" type="stmt"/> | ||
<line num="70" count="1" type="stmt"/> | ||
</file> | ||
<file name="getRawTransactionNight.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/contract/getRawTransactionNight.ts"> | ||
<metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/> | ||
<line num="18" count="2" type="stmt"/> | ||
<line num="23" count="1" type="stmt"/> | ||
<line num="24" count="1" type="stmt"/> | ||
</file> | ||
<file name="getRawTransactionPortkey.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/contract/getRawTransactionPortkey.ts"> | ||
<metrics statements="6" coveredstatements="6" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/> | ||
<line num="14" count="1" type="stmt"/> | ||
<line num="23" count="2" type="stmt"/> | ||
<line num="24" count="2" type="stmt"/> | ||
<line num="33" count="1" type="stmt"/> | ||
<line num="35" count="1" type="stmt"/> | ||
<line num="37" count="1" type="stmt"/> | ||
</file> | ||
<file name="getTxResultRetry.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/contract/getTxResultRetry.ts"> | ||
<metrics statements="12" coveredstatements="12" conditionals="7" coveredconditionals="5" methods="2" coveredmethods="2"/> | ||
<line num="5" count="7" type="cond" truecount="1" falsecount="1"/> | ||
<line num="6" count="7" type="stmt"/> | ||
<line num="8" count="7" type="cond" truecount="1" falsecount="1"/> | ||
<line num="9" count="7" type="stmt"/> | ||
<line num="11" count="7" type="stmt"/> | ||
<line num="18" count="2" type="stmt"/> | ||
<line num="19" count="2" type="stmt"/> | ||
<line num="20" count="2" type="stmt"/> | ||
<line num="21" count="2" type="cond" truecount="2" falsecount="0"/> | ||
<line num="22" count="1" type="stmt"/> | ||
<line num="24" count="1" type="stmt"/> | ||
<line num="27" count="1" type="stmt"/> | ||
</file> | ||
<file name="useCheckAllowanceAndApprove.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/contract/useCheckAllowanceAndApprove.ts"> | ||
<metrics statements="17" coveredstatements="17" conditionals="7" coveredconditionals="7" methods="2" coveredmethods="2"/> | ||
<line num="23" count="1" type="stmt"/> | ||
<line num="38" count="6" type="stmt"/> | ||
<line num="39" count="6" type="stmt"/> | ||
<line num="41" count="6" type="stmt"/> | ||
<line num="42" count="3" type="stmt"/> | ||
<line num="43" count="3" type="stmt"/> | ||
<line num="44" count="3" type="stmt"/> | ||
<line num="67" count="2" type="cond" truecount="3" falsecount="0"/> | ||
<line num="68" count="2" type="cond" truecount="2" falsecount="0"/> | ||
<line num="70" count="2" type="cond" truecount="2" falsecount="0"/> | ||
<line num="71" count="1" type="stmt"/> | ||
<line num="73" count="1" type="stmt"/> | ||
<line num="90" count="1" type="stmt"/> | ||
<line num="92" count="1" type="stmt"/> | ||
<line num="94" count="1" type="stmt"/> | ||
<line num="96" count="3" type="stmt"/> | ||
<line num="109" count="6" type="stmt"/> | ||
</file> | ||
<file name="useGetBalance.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/contract/useGetBalance.ts"> | ||
<metrics statements="11" coveredstatements="10" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="2"/> | ||
<line num="5" count="1" type="stmt"/> | ||
<line num="16" count="2" type="stmt"/> | ||
<line num="17" count="2" type="stmt"/> | ||
<line num="19" count="2" type="stmt"/> | ||
<line num="20" count="1" type="stmt"/> | ||
<line num="21" count="1" type="stmt"/> | ||
<line num="22" count="1" type="stmt"/> | ||
<line num="31" count="1" type="stmt"/> | ||
<line num="33" count="0" type="stmt"/> | ||
<line num="35" count="1" type="stmt"/> | ||
<line num="39" count="2" type="stmt"/> | ||
</file> | ||
</package> | ||
<package name="format"> | ||
<metrics statements="19" coveredstatements="19" conditionals="21" coveredconditionals="21" methods="4" coveredmethods="4"/> | ||
<file name="formatNumberWithDecimalPlaces.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/format/formatNumberWithDecimalPlaces.ts"> | ||
<metrics statements="4" coveredstatements="4" conditionals="3" coveredconditionals="3" methods="1" coveredmethods="1"/> | ||
<line num="2" count="1" type="stmt"/> | ||
<line num="4" count="8" type="stmt"/> | ||
<line num="5" count="8" type="cond" truecount="2" falsecount="0"/> | ||
<line num="6" count="7" type="stmt"/> | ||
</file> | ||
<file name="formatPrice.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/format/formatPrice.ts"> | ||
<metrics statements="8" coveredstatements="8" conditionals="13" coveredconditionals="13" methods="1" coveredmethods="1"/> | ||
<line num="15" count="8" type="cond" truecount="2" falsecount="0"/> | ||
<line num="16" count="8" type="cond" truecount="2" falsecount="0"/> | ||
<line num="17" count="8" type="cond" truecount="2" falsecount="0"/> | ||
<line num="19" count="7" type="cond" truecount="4" falsecount="0"/> | ||
<line num="20" count="1" type="stmt"/> | ||
<line num="23" count="6" type="stmt"/> | ||
<line num="24" count="6" type="stmt"/> | ||
<line num="25" count="6" type="stmt"/> | ||
</file> | ||
<file name="formatTime.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/format/formatTime.ts"> | ||
<metrics statements="7" coveredstatements="7" conditionals="5" coveredconditionals="5" methods="2" coveredmethods="2"/> | ||
<line num="3" count="1" type="stmt"/> | ||
<line num="22" count="3" type="stmt"/> | ||
<line num="33" count="3" type="cond" truecount="2" falsecount="0"/> | ||
<line num="34" count="1" type="stmt"/> | ||
<line num="35" count="2" type="cond" truecount="2" falsecount="0"/> | ||
<line num="36" count="1" type="stmt"/> | ||
<line num="38" count="1" type="stmt"/> | ||
</file> | ||
</package> | ||
<package name="is"> | ||
<metrics statements="53" coveredstatements="47" conditionals="82" coveredconditionals="68" methods="9" coveredmethods="9"/> | ||
<file name="isAElfBridge.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/is/isAElfBridge.ts"> | ||
<metrics statements="1" coveredstatements="1" conditionals="2" coveredconditionals="2" methods="1" coveredmethods="1"/> | ||
<line num="5" count="2" type="cond" truecount="2" falsecount="0"/> | ||
</file> | ||
<file name="isELFAddress.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/is/isELFAddress.ts"> | ||
<metrics statements="4" coveredstatements="4" conditionals="2" coveredconditionals="2" methods="1" coveredmethods="1"/> | ||
<line num="4" count="3" type="cond" truecount="2" falsecount="0"/> | ||
<line num="5" count="2" type="stmt"/> | ||
<line num="6" count="2" type="stmt"/> | ||
<line num="8" count="1" type="stmt"/> | ||
</file> | ||
<file name="isMobileDevices.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/is/isMobileDevices.ts"> | ||
<metrics statements="40" coveredstatements="34" conditionals="72" coveredconditionals="58" methods="5" coveredmethods="5"/> | ||
<line num="1" count="1" type="stmt"/> | ||
<line num="2" count="1" type="stmt"/> | ||
<line num="3" count="1" type="stmt"/> | ||
<line num="4" count="1" type="stmt"/> | ||
<line num="5" count="1" type="stmt"/> | ||
<line num="6" count="1" type="stmt"/> | ||
<line num="7" count="1" type="stmt"/> | ||
<line num="8" count="1" type="stmt"/> | ||
<line num="9" count="1" type="stmt"/> | ||
<line num="10" count="1" type="stmt"/> | ||
<line num="11" count="1" type="stmt"/> | ||
<line num="12" count="1" type="stmt"/> | ||
<line num="13" count="1" type="stmt"/> | ||
<line num="14" count="1" type="stmt"/> | ||
<line num="15" count="1" type="stmt"/> | ||
<line num="24" count="1" type="stmt"/> | ||
<line num="25" count="2" type="stmt"/> | ||
<line num="34" count="84" type="stmt"/> | ||
<line num="76" count="2" type="stmt"/> | ||
<line num="82" count="2" type="cond" truecount="3" falsecount="1"/> | ||
<line num="83" count="2" type="stmt"/> | ||
<line num="88" count="0" type="cond" truecount="0" falsecount="2"/> | ||
<line num="89" count="0" type="stmt"/> | ||
<line num="90" count="0" type="cond" truecount="0" falsecount="4"/> | ||
<line num="91" count="0" type="stmt"/> | ||
<line num="98" count="2" type="stmt"/> | ||
<line num="102" count="2" type="stmt"/> | ||
<line num="103" count="2" type="cond" truecount="1" falsecount="1"/> | ||
<line num="104" count="0" type="stmt"/> | ||
<line num="110" count="2" type="stmt"/> | ||
<line num="111" count="2" type="cond" truecount="1" falsecount="1"/> | ||
<line num="112" count="0" type="stmt"/> | ||
<line num="115" count="2" type="stmt"/> | ||
<line num="117" count="2" type="stmt"/> | ||
<line num="179" count="2" type="stmt"/> | ||
<line num="182" count="2" type="cond" truecount="3" falsecount="0"/> | ||
<line num="183" count="2" type="cond" truecount="3" falsecount="0"/> | ||
<line num="185" count="2" type="stmt"/> | ||
<line num="189" count="2" type="stmt"/> | ||
<line num="190" count="2" type="cond" truecount="2" falsecount="0"/> | ||
</file> | ||
<file name="isPortkeyApp.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/is/isPortkeyApp.ts"> | ||
<metrics statements="3" coveredstatements="3" conditionals="2" coveredconditionals="2" methods="1" coveredmethods="1"/> | ||
<line num="2" count="2" type="cond" truecount="2" falsecount="0"/> | ||
<line num="3" count="1" type="stmt"/> | ||
<line num="5" count="1" type="stmt"/> | ||
</file> | ||
<file name="isPrivateKey.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/is/isPrivateKey.ts"> | ||
<metrics statements="5" coveredstatements="5" conditionals="4" coveredconditionals="4" methods="1" coveredmethods="1"/> | ||
<line num="2" count="3" type="stmt"/> | ||
<line num="3" count="3" type="cond" truecount="4" falsecount="0"/> | ||
<line num="4" count="2" type="stmt"/> | ||
<line num="7" count="1" type="stmt"/> | ||
<line num="9" count="1" type="stmt"/> | ||
</file> | ||
</package> | ||
<package name="utility"> | ||
<metrics statements="17" coveredstatements="17" conditionals="6" coveredconditionals="5" methods="7" coveredmethods="7"/> | ||
<file name="Loading.tsx" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/utility/Loading.tsx"> | ||
<metrics statements="16" coveredstatements="16" conditionals="6" coveredconditionals="5" methods="5" coveredmethods="5"/> | ||
<line num="4" count="4" type="stmt"/> | ||
<line num="5" count="4" type="stmt"/> | ||
<line num="9" count="4" type="stmt"/> | ||
<line num="13" count="4" type="cond" truecount="2" falsecount="0"/> | ||
<line num="14" count="3" type="stmt"/> | ||
<line num="15" count="3" type="stmt"/> | ||
<line num="16" count="3" type="stmt"/> | ||
<line num="21" count="4" type="stmt"/> | ||
<line num="23" count="4" type="cond" truecount="2" falsecount="0"/> | ||
<line num="27" count="3" type="stmt"/> | ||
<line num="31" count="1" type="stmt"/> | ||
<line num="32" count="1" type="cond" truecount="1" falsecount="1"/> | ||
<line num="33" count="1" type="stmt"/> | ||
<line num="34" count="1" type="stmt"/> | ||
<line num="35" count="1" type="stmt"/> | ||
<line num="36" count="1" type="stmt"/> | ||
</file> | ||
<file name="sleep.ts" path="/Users/liuxiyang/work/code/aelf-web-login/packages/utils/src/utility/sleep.ts"> | ||
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="2"/> | ||
<line num="2" count="1" type="stmt"/> | ||
</file> | ||
</package> | ||
</project> | ||
</coverage> |
Oops, something went wrong.