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

Fix send sheet stuck on loading #6119

Merged
merged 9 commits into from
Sep 20, 2024
Merged
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
11 changes: 9 additions & 2 deletions src/screens/SendSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -588,14 +588,22 @@ export default function SendSheet(props) {
})();
}
},
[amountDetails.assetAmount, goBack, isENS, isHardwareWallet, navigate, onSubmit, recipient, selected?.name, selected?.network]
[amountDetails, goBack, isENS, isHardwareWallet, navigate, onSubmit, recipient, selected?.name, selected?.network]
);

const { buttonDisabled, buttonLabel } = useMemo(() => {
const isZeroAssetAmount = Number(amountDetails.assetAmount) <= 0;
let disabled = true;
let label = lang.t('button.confirm_exchange.enter_amount');

console.log({
empty: isEmpty(gasFeeParamsBySpeed),
selectedGasFee: !selectedGasFee,
gasFee: isEmpty(selectedGasFee?.gasFee),
toAddress: !toAddress,
needsL1SecurityFeeChains: needsL1SecurityFeeChains.includes(currentChainId) && l1GasFeeOptimism === null,
});

walmat marked this conversation as resolved.
Show resolved Hide resolved
if (isENS && !ensProfile.isSuccess) {
label = lang.t('button.confirm_exchange.loading');
disabled = true;
Expand Down Expand Up @@ -764,7 +772,6 @@ export default function SendSheet(props) {

if (
!!accountAddress &&
amountDetails.assetAmount !== '' &&
Object.entries(selected).length &&
assetChainId === currentChainId &&
currentProviderChainId === currentChainId &&
Expand Down
Loading