Skip to content

Commit a1d1469

Browse files
fix: small swaps changes (#2356)
1 parent 3d13273 commit a1d1469

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

apps/namadillo/src/App/Masp/ShieldedAssetTable.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
shieldedTokensAtom,
77
} from "atoms/balance/atoms";
88
import { useAtomValue } from "jotai";
9-
import { useState } from "react";
9+
import { useEffect, useState } from "react";
1010
import { useNavigate } from "react-router-dom";
1111
import { ShieldedFungibleTable } from "./ShieldedFungibleTable";
1212
import { ShieldedNFTTable } from "./ShieldedNFTTable";
@@ -31,11 +31,17 @@ const ShieldAssetCta = (): JSX.Element => {
3131

3232
export const ShieldedAssetTable = (): JSX.Element => {
3333
const [tab, setTab] = useState(tabs[0]);
34+
const { refetch: refetchShieldedTokens } = useAtomValue(shieldedTokensAtom);
3435
const shieldedTokensQuery = useAtomValue(shieldedTokensAtom);
3536
const shielededTokensRewardsEstQuery = useAtomValue(
3637
shieldedRewardsPerTokenAtom
3738
);
3839

40+
// Refetch shielded tokens on mount
41+
useEffect(() => {
42+
refetchShieldedTokens();
43+
}, []);
44+
3945
if (shieldedTokensQuery.data === undefined) {
4046
return <SkeletonLoading height="125px" width="100%" />;
4147
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ export const SwapInProgress = (): JSX.Element => {
2020
status.txHash &&
2121
tx.hash === status.txHash
2222
) {
23+
// TODO: Handle this elswhere, because if we change view before the disposable
24+
// signer won't be cleared
2325
await clearDisposableSigner(tx.refundTarget);
2426
setStatus({ t: "Completed" });
2527
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ export const SwapSelectAssetModal = ({
4343
asset.name.toLowerCase().indexOf(filter.toLowerCase()) >= 0 ||
4444
asset.symbol.toLowerCase().indexOf(filter.toLowerCase()) >= 0
4545
)
46-
// We temporarily hide stride assets until we support them fully
46+
// We temporarily hide stride and um assets until we support them fully
4747
.filter(
4848
(asset) =>
4949
!asset.traces?.find(
5050
(trace) =>
51-
trace.type === "ibc" && trace.counterparty.chain_name === "stride"
51+
trace.type === "ibc" &&
52+
["stride", "penumbra"].includes(trace.counterparty.chain_name)
5253
)
5354
);
5455

apps/namadillo/src/hooks/useTransactionNotifications.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,11 @@ export const useTransactionNotifications = (): void => {
576576
symbol={tx.targetAsset.symbol}
577577
/>
578578
</b>{" "}
579-
has completed
579+
has completed.
580+
<br />
581+
<b>Note:</b> your balance may not immediately reflect this. If
582+
that&apos;s the case, plase wait a few seconds and refresh your
583+
balance.
580584
</>
581585
),
582586
type: "success",

0 commit comments

Comments
 (0)