Skip to content

Commit ae83a6d

Browse files
fix: format gas fee USD to 2 decimals and populate destContract on swap recovery
- FeeDetails: add format prop to collapsed gas-fee NumberFlow so USD doesn't render with 3 decimals - useRecoverSwap: include destContract in recovered SwapData so useSwapProgress can build solverLockParams and start solver-lock polling (recovered swaps were hanging on "Awaiting reservation")
1 parent 028e43e commit ae83a6d

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/app/components/FeeDetails/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const DetailsButton: FC<QuoteComponentProps> = ({ quote, isQuoteLoading,
105105
{ "animate-pulse-strong": isQuoteLoading }
106106
)}>
107107
<GasIcon className='h-4 w-4 text-secondary-text' />
108-
<NumberFlow className="text-primary-text text-sm leading-6" value={gasFeeInUsd < 0.01 ? 0.01 : gasFeeInUsd} prefix={gasFeeInUsd < 0.01 ? '<$' : '$'} />
108+
<NumberFlow className="text-primary-text text-sm leading-6" value={gasFeeInUsd < 0.01 ? 0.01 : gasFeeInUsd} prefix={gasFeeInUsd < 0.01 ? '<$' : '$'} format={{ minimumFractionDigits: 2, maximumFractionDigits: 2 }} />
109109
</div>
110110
<div className="w-px h-3 bg-primary-text-tertiary rounded-2xl" />
111111
</>

‎packages/react/src/hooks/useRecoverSwap.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export function useRecoverSwap(): UseRecoverSwapResult {
7474
source_asset: srcToken?.symbol ?? details.token,
7575
destination_asset: dstToken?.symbol ?? details.dstToken ?? '',
7676
srcContract: srcNetwork.trainContract,
77+
destContract: dstNetwork?.trainContract,
7778
srcTokenContract: details.token,
7879
destTokenContract: details.dstToken ?? '',
7980
hashlock: details.hashlock,

0 commit comments

Comments
 (0)