diff --git a/src/components/Fee.tsx b/src/components/Fee.tsx new file mode 100644 index 0000000..9ca041e --- /dev/null +++ b/src/components/Fee.tsx @@ -0,0 +1,29 @@ +import { useI18n } from "~/i18n/context"; +import { AmountFiat, AmountSats } from "~/components/Amount"; +import { FeesModal } from "~/components/MoreInfoModal"; + +export function Fee(props: { amountSats?: bigint | number }) { + const i18n = useI18n(); + + return ( +
+

{i18n.t("common.fee")}

+
+
+
+ +
+
+ +
+
+
+ +
+
+
+ ); +} diff --git a/src/routes/Receive.tsx b/src/routes/Receive.tsx index 6b30aed..0d2cba0 100644 --- a/src/routes/Receive.tsx +++ b/src/routes/Receive.tsx @@ -47,6 +47,7 @@ import side2side from "~/assets/icons/side-to-side.svg"; import { useI18n } from "~/i18n/context"; import eify from "~/utils/eify"; import { matchError } from "~/logic/errorDispatch"; +import { Fee } from "~/components/Fee"; type OnChainTx = { transaction: { @@ -486,30 +487,7 @@ export default function Receive() { paidState() === "lightning_paid" } > -
-

- {i18n.t("common.fee")} -

-
-
-
- -
-
- -
-
-
- {/*TODO: Add different fee hints insode of */} - -
-
-
+ {/*TODO: Confirmation time estimate still not possible needs to be implemented in mutiny-node first {/*TODO: add internal payment detail page* for lightning*/} diff --git a/src/routes/Send.tsx b/src/routes/Send.tsx index f38068d..6cbcf3d 100644 --- a/src/routes/Send.tsx +++ b/src/routes/Send.tsx @@ -44,10 +44,10 @@ import { ExternalLink } from "~/components/layout/ExternalLink"; import { InfoBox } from "~/components/InfoBox"; import { useI18n } from "~/i18n/context"; import { ParsedParams, toParsedParams } from "~/logic/waila"; -import { FeesModal } from "~/components/MoreInfoModal"; import { Clipboard } from "@capacitor/clipboard"; import { Capacitor } from "@capacitor/core"; import { FeedbackLink } from "./Feedback"; +import { Fee } from "~/components/Fee"; export type SendSource = "lightning" | "onchain"; @@ -623,35 +623,7 @@ export default function Send() {
-
-

- {i18n.t("common.fee")} -

-
-
-
- -
-
- -
-
-
- -
-
-
+ Button +