Skip to content

Commit 17ac8f8

Browse files
authored
fix: fixing transaction receipt details not appearing for shielding transfers (#1897)
1 parent 0d0cfaa commit 17ac8f8

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

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

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { FaCheckCircle } from "react-icons/fa";
1919
import { GoHourglass, GoXCircle } from "react-icons/go";
2020
import {
2121
allTransferTypes,
22-
ibcTransferTypes,
2322
PartialTransferTransactionData,
2423
TransferStep,
2524
} from "types";
@@ -48,10 +47,7 @@ const TransferTransactionReceipt = ({
4847
const getChain = (chainId: string, address: string): Chain | undefined => {
4948
const chain = findChainById(chainId);
5049
if (isNamadaAddress(address) && chain) {
51-
return parseChainInfo(
52-
chain,
53-
isShieldedAddress(transaction.destinationAddress || "")
54-
);
50+
return parseChainInfo(chain, isShieldedAddress(address || ""));
5551
}
5652
return chain;
5753
};
@@ -61,15 +57,12 @@ const TransferTransactionReceipt = ({
6157
}, [transaction]);
6258

6359
const destinationChain = useMemo(() => {
64-
const isIbc = ibcTransferTypes.includes(transaction.type);
65-
if (!isIbc) return sourceChain;
66-
67-
if ("destinationChainId" in transaction && transaction.destinationChainId) {
68-
return getChain(
69-
transaction.destinationChainId,
70-
transaction.destinationAddress || ""
71-
);
72-
}
60+
return getChain(
61+
"destinationChainId" in transaction ?
62+
transaction.destinationChainId || ""
63+
: transaction.chainId,
64+
transaction.destinationAddress || ""
65+
);
7366
}, [transaction]);
7467

7568
const sourceWallet =

apps/namadillo/src/App/Transfer/common.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ export const parseChainInfo = (
88
): Chain | undefined => {
99
if (!chain) return undefined;
1010

11-
if (chain.chain_name !== "namada") {
11+
// Includes namadacampfire, namadahousefire, etc.
12+
if (chain.chain_name.indexOf("namada") === -1) {
1213
return chain;
1314
}
1415

apps/namadillo/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ export const transparentTransferTypes: Array<keyof AllTransferStages> = [
310310
"TransparentToIbc",
311311
"TransparentToTransparent",
312312
"IbcToTransparent",
313+
"TransparentToShielded",
313314
] as const;
314315

315316
export const ibcTransferTypes: Array<keyof AllTransferStages> = [

0 commit comments

Comments
 (0)