Skip to content

fix: mms-2001 first step bridge #30644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions shared/types/bridge-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export type Step = {
action: ActionTypes;
srcChainId: ChainId;
destChainId?: ChainId;
srcAsset: Asset;
destAsset: Asset;
srcAsset?: Asset;
destAsset?: Asset;
srcAmount: string;
destAmount: string;
protocol: Protocol;
Expand Down
4 changes: 2 additions & 2 deletions shared/types/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ type Step = {
action: ActionTypes;
srcChainId: ChainId;
destChainId?: ChainId;
srcAsset: BridgeAsset;
destAsset: BridgeAsset;
srcAsset?: BridgeAsset;
destAsset?: BridgeAsset;
srcAmount: string;
destAmount: string;
protocol: Protocol;
Expand Down
33 changes: 17 additions & 16 deletions ui/pages/bridge/transaction-details/bridge-step-description.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ const getBridgeActionText = (
destNetworkConfiguration?.chainId as AllowedBridgeChainIds
];

const destSymbol = step.destAsset?.symbol;

if (!destSymbol) {
return null;
}

return stepStatus === StatusTypes.COMPLETE
? t('bridgeStepActionBridgeComplete', [
step.destAsset.symbol,
destChainName,
])
: t('bridgeStepActionBridgePending', [
step.destAsset.symbol,
destChainName,
]);
? t('bridgeStepActionBridgeComplete', [destSymbol, destChainName])
: t('bridgeStepActionBridgePending', [destSymbol, destChainName]);
};

const getBridgeActionStatus = (bridgeHistoryItem: BridgeHistoryItem) => {
Expand Down Expand Up @@ -115,15 +115,16 @@ const getSwapActionText = (
status: StatusTypes | null,
step: Step,
) => {
const srcSymbol = step.srcAsset?.symbol;
const destSymbol = step.destAsset?.symbol;

if (!srcSymbol || !destSymbol) {
return null;
}

return status === StatusTypes.COMPLETE
? t('bridgeStepActionSwapComplete', [
step.srcAsset.symbol,
step.destAsset.symbol,
])
: t('bridgeStepActionSwapPending', [
step.srcAsset.symbol,
step.destAsset.symbol,
]);
? t('bridgeStepActionSwapComplete', [srcSymbol, destSymbol])
: t('bridgeStepActionSwapPending', [srcSymbol, destSymbol]);
};

export const getStepStatus = ({
Expand Down
Loading