Skip to content

Commit

Permalink
🚧 lifi
Browse files Browse the repository at this point in the history
  • Loading branch information
dieguezguille committed Jan 7, 2025
1 parent fbbae4b commit 3edb7af
Show file tree
Hide file tree
Showing 6 changed files with 250 additions and 126 deletions.
18 changes: 5 additions & 13 deletions src/components/payments/AssetSelectionSheet.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Address } from "@exactly/common/validation";
import { Coins } from "@tamagui/lucide-icons";
import React from "react";
import { Sheet, Spinner } from "tamagui";
import { Sheet } from "tamagui";

import AssetSelector from "../shared/AssetSelector";
import Button from "../shared/Button";
Expand All @@ -13,15 +13,12 @@ export default function AssetSelectionSheet({
onClose,
onAssetSelected,
positions,

symbol,
isSimulating,
disabled,
}: {
open: boolean;
onClose: () => void;
onAssetSelected: (market: Address) => void;
isSimulating?: boolean;
symbol?: string;
positions?: {
symbol: string;
Expand Down Expand Up @@ -63,19 +60,14 @@ export default function AssetSelectionSheet({
<Button
onPress={onClose}
contained
disabled={disabled}
main
spaced
fullwidth
iconAfter={
isSimulating ? (
<Spinner color="$interactiveOnDisabled" />
) : (
<Coins
strokeWidth={2.5}
color={disabled ? "$interactiveOnDisabled" : "$interactiveOnBaseBrandDefault"}
/>
)
<Coins
strokeWidth={2.5}
color={disabled ? "$interactiveOnDisabled" : "$interactiveOnBaseBrandDefault"}
/>
}
>
{symbol ? `Pay with ${symbol}` : "Select an asset"}
Expand Down
17 changes: 4 additions & 13 deletions src/components/payments/Failure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,11 @@ export default function Failure({
})}
</Text>
<XStack gap="$s2" alignItems="center">
{currency === "USDC" ? (
<Text emphasized secondary subHeadline>
{Number(amount).toLocaleString(undefined, {
maximumFractionDigits: 8,
minimumFractionDigits: 0,
})}
</Text>
) : (
<Text emphasized secondary subHeadline>
Paid with&nbsp;
</Text>
)}
<Text emphasized secondary subHeadline>
{currency}&nbsp;
{Number(amount).toLocaleString(undefined, { maximumFractionDigits: 8 })}
</Text>
<Text emphasized secondary subHeadline>
&nbsp;{currency}&nbsp;
</Text>
<AssetLogo uri={assetLogos[currency as keyof typeof assetLogos]} width={ms(16)} height={ms(16)} />
</XStack>
Expand Down
Loading

0 comments on commit 3edb7af

Please sign in to comment.