Skip to content

Commit 2b3389c

Browse files
committed
fix: import amountMaxDecimalPlaces from utils into transfersource
1 parent 09ab13d commit 2b3389c

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

apps/namadillo/src/App/Transfer/TransferSource.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import BigNumber from "bignumber.js";
77
import clsx from "clsx";
88
import { wallets } from "integrations";
99
import { Address } from "types";
10+
import { amountMaxDecimalPlaces } from "utils/assets";
1011
import namadaShieldedIcon from "./assets/namada-shielded.svg";
1112
import namadaTransparentIcon from "./assets/namada-transparent.svg";
1213
import { isShieldedAddress, isTransparentAddress } from "./common";
@@ -27,17 +28,6 @@ export type TransferSourceProps = {
2728
onChangeAmount?: (amount: BigNumber | undefined) => void;
2829
};
2930

30-
const amountMaxDecimalPlaces = (asset?: Asset): number | undefined => {
31-
if (typeof asset !== "undefined") {
32-
for (const { denom, exponent } of asset.denom_units) {
33-
if (denom === asset.display) {
34-
return exponent;
35-
}
36-
}
37-
}
38-
return undefined;
39-
};
40-
4131
const getWalletIcon = (
4232
sourceAddress?: string,
4333
selectedTokenType?: "shielded" | "transparent" | "keplr"

0 commit comments

Comments
 (0)