Skip to content

Commit 02441fd

Browse files
committed
linting
1 parent 35ecd34 commit 02441fd

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

packages/mobile-app/utils/send.utils.ts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@ import { Asset } from "@/data/facades/chain/types";
22
import { IRON_ASSET_ID_HEX } from "../data/constants";
33
import { CurrencyUtils } from "@ironfish/sdk";
44

5-
type AmountValidationResult = [bigint, null] | [null, Error];
6-
7-
interface AssetWithVerification extends Asset {
8-
verification: {
9-
status: "verified" | "unverified" | "unknown";
10-
decimals?: number;
11-
};
12-
}
13-
145
export const isValidBigInt = (num: string) => {
156
if (num.length === 0) return false;
167
try {
@@ -22,7 +13,7 @@ export const isValidBigInt = (num: string) => {
2213
};
2314

2415
export const getAssetDecimals = (
25-
asset: AssetWithVerification | undefined,
16+
asset: Asset | undefined,
2617
): number | undefined => {
2718
if (!asset) return undefined;
2819
try {
@@ -37,8 +28,8 @@ export const getAssetDecimals = (
3728
export const convertAmountToMinor = (
3829
amount: string,
3930
assetId: string,
40-
assetMap: Map<string, AssetWithVerification>,
41-
): AmountValidationResult => {
31+
assetMap: Map<string, Asset>,
32+
) => {
4233
const asset =
4334
assetId === IRON_ASSET_ID_HEX ? undefined : assetMap.get(assetId);
4435
return CurrencyUtils.tryMajorToMinor(amount, assetId, {
@@ -49,7 +40,7 @@ export const convertAmountToMinor = (
4940
export const isValidAmount = (
5041
value: string,
5142
assetId: string,
52-
assetMap: Map<string, AssetWithVerification>,
43+
assetMap: Map<string, Asset>,
5344
) => {
5445
if (value.length === 0) return true;
5546

@@ -68,7 +59,7 @@ export const isValidAmount = (
6859
export const enforceDecimals = (
6960
value: string,
7061
assetId: string,
71-
assetMap: Map<string, AssetWithVerification>,
62+
assetMap: Map<string, Asset>,
7263
): string => {
7364
if (value.length === 0) return value;
7465

0 commit comments

Comments
 (0)