Skip to content

Commit 7acbb50

Browse files
committed
fix: rebase conflicts
1 parent 6336392 commit 7acbb50

File tree

13 files changed

+32
-155
lines changed

13 files changed

+32
-155
lines changed

apps/namadillo/src/App/Common/SelectAssetModal.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ import clsx from "clsx";
1010
import { useAtomValue } from "jotai";
1111
import { useMemo, useState } from "react";
1212
import { twMerge } from "tailwind-merge";
13-
import { Address, Asset, NamadaAsset, WalletProvider } from "types";
13+
import { Address, Asset, NamadaAsset } from "types";
1414

1515
type DisplayAmount = BigNumber;
1616
type FiatAmount = BigNumber;
1717
type SelectWalletModalProps = {
1818
onClose: () => void;
1919
onSelect: (address: Address) => void;
2020
assets: Asset[];
21-
wallet: WalletProvider;
2221
walletAddress: string;
2322
ibcTransfer?: "deposit" | "withdraw";
2423
balances?: Record<Address, [DisplayAmount, FiatAmount?]>;
@@ -28,7 +27,6 @@ export const SelectAssetModal = ({
2827
onClose,
2928
onSelect,
3029
assets,
31-
wallet,
3230
walletAddress,
3331
ibcTransfer,
3432
balances,
@@ -48,7 +46,7 @@ export const SelectAssetModal = ({
4846

4947
return (
5048
<SelectModal title="Select Asset" onClose={onClose}>
51-
<ConnectedWalletInfo wallet={wallet} walletAddress={walletAddress} />
49+
<ConnectedWalletInfo walletAddress={walletAddress} />
5250
<div className="my-4">
5351
<Search placeholder="Search asset" onChange={setFilter} />
5452
</div>

apps/namadillo/src/App/Common/TransactionFee.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
import BigNumber from "bignumber.js";
2+
import clsx from "clsx";
23
import { TokenCurrency } from "./TokenCurrency";
34

45
type TransactionFeeProps = {
56
displayAmount: BigNumber;
67
symbol: string;
8+
compact?: boolean;
79
};
810

911
export const TransactionFee = ({
1012
displayAmount,
1113
symbol,
14+
compact = false,
1215
}: TransactionFeeProps): JSX.Element => {
1316
return (
1417
<div className="flex w-full gap-2">
15-
<span className="text-sm mt-[3px] ml-1 underline leading-none text-neutral-300">
16-
Transaction Fee
18+
<span
19+
className={clsx(
20+
"text-sm mt-[3px] ml-1 leading-none text-neutral-300",
21+
{ underline: !compact },
22+
{ "text-neutral-400": compact }
23+
)}
24+
>
25+
{compact ? "Fee:" : "Transaction Fee"}
1726
</span>
1827
<TokenCurrency
1928
symbol={symbol}

apps/namadillo/src/App/Common/TransactionFeeButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const TransactionFeeButton = ({
4242
)}
4343
>
4444
<TransactionFee
45+
compact={compact}
4546
displayAmount={gasDisplayAmount?.totalDisplayAmount || BigNumber(0)}
4647
symbol={(!compact && gasDisplayAmount?.asset.symbol) || ""}
4748
/>

apps/namadillo/src/App/Common/__tests__/SelectAssetModal.test.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
22
import { assetMockList } from "../__mocks__/assets";
3-
import { walletMock } from "../__mocks__/providers";
43
import { SelectAssetModal } from "../SelectAssetModal";
54

65
jest.mock("hooks/useIsChannelInactive", () => ({
@@ -21,7 +20,6 @@ describe("SelectAssetModal", () => {
2120
onClose={onCloseMock}
2221
onSelect={onSelectMock}
2322
assets={assetMockList}
24-
wallet={walletMock}
2523
walletAddress={mockAddress}
2624
/>
2725
);
@@ -34,7 +32,6 @@ describe("SelectAssetModal", () => {
3432
onClose={onCloseMock}
3533
onSelect={onSelectMock}
3634
assets={assetMockList}
37-
wallet={walletMock}
3835
walletAddress={mockAddress}
3936
/>
4037
);
@@ -48,7 +45,6 @@ describe("SelectAssetModal", () => {
4845
onClose={onCloseMock}
4946
onSelect={onSelectMock}
5047
assets={assetMockList}
51-
wallet={walletMock}
5248
walletAddress={mockAddress}
5349
/>
5450
);
@@ -69,7 +65,6 @@ describe("SelectAssetModal", () => {
6965
onClose={onCloseMock}
7066
onSelect={onSelectMock}
7167
assets={assetMockList}
72-
wallet={walletMock}
7368
walletAddress={mockAddress}
7469
/>
7570
);

apps/namadillo/src/App/Swap/SwapCalculations.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ export const SwapCalculations = (): JSX.Element => {
265265
balances={balances}
266266
onSelect={onChangeSellSelectedAsset}
267267
walletAddress={shieldedAccountAddress}
268-
wallet={wallets.namada}
269268
/>
270269
)}
271270
{buyAssetSelectorModalOpen && shieldedAccountAddress && (
@@ -275,7 +274,6 @@ export const SwapCalculations = (): JSX.Element => {
275274
balances={balances}
276275
onSelect={onChangeBuySelectedAsset}
277276
walletAddress={shieldedAccountAddress}
278-
wallet={wallets.namada}
279277
/>
280278
)}
281279
{walletSelectorModalOpen && (

apps/namadillo/src/App/Swap/hooks/usePerformOsmosisSwapTx.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@ export function usePerformOsmosisSwapTx(): UsePerformOsmosisSwapResult {
127127
invariant(buyAmount, "No buy amount");
128128
invariant(sellAsset && buyAsset, "Missing swap assets");
129129

130-
const toTrace = buyAsset.traces?.find((t) => t.type === "ibc")?.chain
131-
.path;
130+
const toTrace =
131+
buyAsset.traces?.find((t) => t.type === "ibc")?.chain.path ||
132+
// For NAM token, we want to use address directly
133+
buyAsset.address;
132134
invariant(toTrace, "No IBC trace found");
133135

134136
const route = quote.routes[0]?.pools;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { Asset } from "@chain-registry/types";
22
import { Stack } from "@namada/components";
33
import { AccountType } from "@namada/types";
44
import { shortenAddress } from "@namada/utils";
5+
import { ConnectProviderButton } from "App/Common/ConnectProviderButton";
6+
import { TokenAmountCard } from "App/Common/TokenAmountCard";
57
import { TransactionFee } from "App/Common/TransactionFee";
68
import { TransactionFeeButton } from "App/Common/TransactionFeeButton";
79
import { routes } from "App/routes";
@@ -28,12 +30,10 @@ import { Address } from "types";
2830
import namadaShieldedIcon from "./assets/namada-shielded.svg";
2931
import namadaTransparentIcon from "./assets/namada-transparent.svg";
3032
import shieldedEye from "./assets/shielded-eye.svg";
31-
import { ConnectProviderButton } from "./ConnectProviderButton";
3233
import { CustomAddressForm } from "./CustomAddressForm";
3334
import { DestinationAddressModal } from "./DestinationAddressModal";
3435
import { SelectedWallet } from "./SelectedWallet";
3536
import { ShieldedPropertiesTooltip } from "./ShieldedPropertiesTooltip";
36-
import { TokenAmountCard } from "./TokenAmountCard";
3737

3838
type TransferDestinationProps = {
3939
isShieldedAddress?: boolean;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ActionButton, Stack } from "@namada/components";
2+
import { CurrentStatus } from "App/Common/CurrentStatus";
23
import { IconTooltip } from "App/Common/IconTooltip";
34
import { InlineError } from "App/Common/InlineError";
45
import { params, routes } from "App/routes";
@@ -24,7 +25,6 @@ import { AssetWithAmountAndChain } from "types";
2425
import { filterAvailableAssetsWithBalance } from "utils/assets";
2526
import { getDisplayGasFee } from "utils/gas";
2627
import { isIbcAddress, isShieldedAddress } from "./common";
27-
import { CurrentStatus } from "./CurrentStatus";
2828
import { IbcChannels } from "./IbcChannels";
2929
import { SelectToken } from "./SelectToken";
3030
import { SuccessAnimation } from "./SuccessAnimation";

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { Asset } from "@chain-registry/types";
22
import { AmountInput, Tooltip } from "@namada/components";
3+
import { AvailableAmountFooter } from "App/Common/AvailableAmountFooter";
4+
import { SelectedAsset } from "App/Common/SelectedAsset";
5+
import { TokenAmountCard } from "App/Common/TokenAmountCard";
36
import BigNumber from "bignumber.js";
47
import clsx from "clsx";
58
import { wallets } from "integrations";
69
import { Address } from "types";
710
import namadaShieldedIcon from "./assets/namada-shielded.svg";
811
import namadaTransparentIcon from "./assets/namada-transparent.svg";
9-
import { AvailableAmountFooter } from "./AvailableAmountFooter";
1012
import { isShieldedAddress, isTransparentAddress } from "./common";
11-
import { SelectedAsset } from "./SelectedAsset";
12-
import { TokenAmountCard } from "./TokenAmountCard";
1313

1414
export type TransferSourceProps = {
1515
isLoadingAssets?: boolean;

apps/namadillo/src/App/Transfer/__tests__/TransferDestination.test.tsx

Lines changed: 0 additions & 117 deletions
This file was deleted.

0 commit comments

Comments
 (0)