diff --git a/src/components/transactions/TransactionType.tsx b/src/components/transactions/TransactionType.tsx index dbcb8f3..100f9a6 100644 --- a/src/components/transactions/TransactionType.tsx +++ b/src/components/transactions/TransactionType.tsx @@ -26,7 +26,7 @@ export function getTransactionType(tx: KristTransaction, from?: Wallet, to?: Wallet): InternalTransactionType { switch (tx.type) { case "transfer": - if (from && to && from === to) return "bumped"; + if (tx.from && tx.to && tx.from === tx.to) return "bumped"; if (from && to) return "transferred"; if (from) return "sent"; if (to) return "received"; diff --git a/src/layout/PageLayout.tsx b/src/layout/PageLayout.tsx index 3d26a31..7aa482d 100644 --- a/src/layout/PageLayout.tsx +++ b/src/layout/PageLayout.tsx @@ -23,6 +23,9 @@ className?: string; withoutTopPadding?: boolean; + + onBack?: () => void; + backLink?: string; } export const PageLayout: FC = ({ @@ -35,6 +38,8 @@ className, withoutTopPadding, + onBack, backLink, + children, ...rest }) => { const { t } = useTranslation(); @@ -58,7 +63,11 @@ subTitle={subTitle || (subTitleKey ? t(subTitleKey) : undefined)} extra={extra} - onBack={() => history.goBack()} + onBack={() => { + if (onBack) onBack(); + else if (backLink) history.push(backLink); + else history.goBack(); + }} />} {/* Page contents */}