diff --git a/apps/namadillo/src/App/Ibc/IbcWithdraw.tsx b/apps/namadillo/src/App/Ibc/IbcWithdraw.tsx index f93c38b85c..dfa088d372 100644 --- a/apps/namadillo/src/App/Ibc/IbcWithdraw.tsx +++ b/apps/namadillo/src/App/Ibc/IbcWithdraw.tsx @@ -272,7 +272,8 @@ export const IbcWithdraw = (): JSX.Element => { invariant(props, "Invalid transaction data"); const transferTransaction: IbcTransferTransactionData = { - hash: tx.encodedTxData.txs[0].innerTxHashes[0].toLowerCase(), + hash: tx.encodedTxData.txs[0].hash, + innerHash: tx.encodedTxData.txs[0].innerTxHashes[0].toLowerCase(), currentStep: TransferStep.WaitingConfirmation, rpc: "", type: shielded ? "ShieldedToIbc" : "TransparentToIbc", diff --git a/apps/namadillo/src/App/Staking/StakingRewards.tsx b/apps/namadillo/src/App/Staking/StakingRewards.tsx index de468bca5e..c156f3a9d3 100644 --- a/apps/namadillo/src/App/Staking/StakingRewards.tsx +++ b/apps/namadillo/src/App/Staking/StakingRewards.tsx @@ -72,7 +72,7 @@ export const StakingRewards = (): JSX.Element => { params: rewardsToClaim, eventType: ["ClaimRewards", "Bond"], parsePendingTxNotification: () => ({ - title: "Claim rewards transaction is in progress", + title: "Claim and stake rewards transaction is in progress", description: ( <> Your rewards claim is being processed and will be staked to the same diff --git a/apps/namadillo/src/App/Transactions/TransactionCard.tsx b/apps/namadillo/src/App/Transactions/TransactionCard.tsx index 0788c650dd..ab202cbd3c 100644 --- a/apps/namadillo/src/App/Transactions/TransactionCard.tsx +++ b/apps/namadillo/src/App/Transactions/TransactionCard.tsx @@ -39,7 +39,7 @@ export function getToken( txn: Tx["tx"], nativeToken: string ): string | undefined { - if (txn?.kind === "bond") return nativeToken; + if (txn?.kind === "bond" || txn?.kind === "unbond") return nativeToken; let parsed; try { parsed = txn?.data ? JSON.parse(txn.data) : undefined; @@ -62,7 +62,7 @@ export function getToken( return undefined; } -const getBondTransactionInfo = ( +const getBondOrUnbondTransactionInfo = ( tx: Tx["tx"] ): { amount: BigNumber; sender?: string; receiver?: string } | undefined => { if (!tx?.data) return undefined; @@ -118,10 +118,12 @@ export const TransactionCard = ({ const token = getToken(transaction, nativeToken ?? ""); const chainAssetsMap = useAtomValue(chainAssetsMapAtom); const asset = token ? chainAssetsMap[token] : undefined; - const isBondingTransaction = transactionTopLevel?.tx?.kind === "bond"; + const isBondingOrUnbondingTransaction = ["bond", "unbond"].includes( + transactionTopLevel?.tx?.kind ?? "" + ); const txnInfo = - isBondingTransaction ? - getBondTransactionInfo(transaction) + isBondingOrUnbondingTransaction ? + getBondOrUnbondTransactionInfo(transaction) : getTransactionInfo(transaction); const receiver = txnInfo?.receiver; const sender = txnInfo?.sender; @@ -134,7 +136,8 @@ export const TransactionCard = ({ const getBaseAmount = (): BigNumber | undefined => { if (asset && txnInfo?.amount) { - if (isBondingTransaction) return toDisplayAmount(asset, txnInfo.amount); + if (isBondingOrUnbondingTransaction) + return toDisplayAmount(asset, txnInfo.amount); if (isNamadaAsset(asset)) return txnInfo.amount; return toDisplayAmount(asset, txnInfo.amount); } else return undefined; @@ -154,6 +157,7 @@ export const TransactionCard = ({ if (isReceived) return "Receive"; if (kind.startsWith("ibc")) return "IBC Transfer"; if (kind === "bond") return "Stake"; + if (kind === "unbond") return "Unstake"; if (kind === "claimRewards") return "Claim Rewards"; if (kind === "transparentTransfer") return "Transparent Transfer"; if (kind === "shieldingTransfer") return "Shielding Transfer"; @@ -171,7 +175,9 @@ export const TransactionCard = ({ "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 items-center my-1 font-semibold", "gap-5 bg-neutral-800 rounded-sm px-5 text-white border border-transparent", "transition-colors duration-200 hover:border-neutral-500", - isBondingTransaction && validator?.imageUrl ? "py-3" : "py-5" + isBondingOrUnbondingTransaction && validator?.imageUrl ? + "py-3" + : "py-5" ) )} > @@ -205,7 +211,7 @@ export const TransactionCard = ({