Skip to content
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

Implement tab activity detection to optimize API calls #112

Merged
merged 3 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ module.exports = {
warning.details &&
warning.details.includes("source-map-loader")
);
},
}
];

return webpackConfig;
}
}
};
};
6 changes: 5 additions & 1 deletion src/routes/reservecoin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,11 @@ export default function ReserveCoin() {
? buyValidity === TRANSACTION_VALIDITY.OK
: sellValidity === TRANSACTION_VALIDITY.OK;

const buttonDisabled = isNaN(parseInt(value)) || parseInt(value) === 0 || isWrongChain || !transactionValidated;
const buttonDisabled =
isNaN(parseInt(value)) ||
parseInt(value) === 0 ||
isWrongChain ||
!transactionValidated;

const rcFloat = parseFloat(coinsDetails?.scaledNumberRc.replaceAll(",", ""));
const rcConverted = getRcUsdEquivalent(coinsDetails, rcFloat);
Expand Down
6 changes: 5 additions & 1 deletion src/routes/stablecoin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,11 @@ export default function Stablecoin() {
? buyValidity === TRANSACTION_VALIDITY.OK
: sellValidity === TRANSACTION_VALIDITY.OK;

const buttonDisabled = isNaN(parseInt(value)) || parseInt(value) === 0 || isWrongChain || !transactionValidated;
const buttonDisabled =
isNaN(parseInt(value)) ||
parseInt(value) === 0 ||
isWrongChain ||
!transactionValidated;

const scFloat = parseFloat(coinsDetails?.scaledNumberSc.replaceAll(",", ""));
const scConverted = getScAdaEquivalent(coinsDetails, scFloat);
Expand Down
Loading