update swap transfers when on expanded page

This commit is contained in:
Blake Kaufman
2026-01-09 13:41:15 -05:00
parent 94e5cd2db3
commit 8f039c5671
2 changed files with 12 additions and 6 deletions
+11 -6
View File
@@ -68,15 +68,20 @@ export default function ExpandedTx(props) {
}
try {
const selectedTx = props.route.params.transaction;
const activeTx = sparkInformation.transactions.find(tx => {
return tx.id === props.route.params.transaction?.id;
if (selectedTx.details?.performSwaptoUSD) {
return tx.details.includes(selectedTx.sparkID);
} else {
return tx.id === selectedTx?.id;
}
});
if (
props.route.params.transaction?.paymentStatus !==
activeTx.paymentStatus ||
props.route.params.transaction?.isBalancePending !==
activeTx.isBalancePending
if (activeTx.details.includes(selectedTx.sparkID)) {
setTransaction({ ...activeTx, details: JSON.parse(activeTx.details) });
} else if (
selectedTx?.paymentStatus !== activeTx.paymentStatus ||
selectedTx?.isBalancePending !== activeTx.isBalancePending
) {
setTransaction({ ...activeTx, details: JSON.parse(activeTx.details) });
}
+1
View File
@@ -310,6 +310,7 @@ export function FlashnetProvider({ children }) {
LRC20Token: USDB_TOKEN_ID,
showSwapLabel: true,
currentPriceAInB: poolInfoRef.current?.currentPriceAInB,
ln_funding_id: txDetails.id,
},
};
bulkUpdateSparkTransactions([tx], 'fullUpdate-tokens');