-
{t('Choose an asset to deposit to the Vega network')}
+
-
-
- {a.symbol}{' '}
- ({truncateByChars(a.source.contractAddress)})
-
-
-
-
-
-
-
- );
-
- // TODO handle selected and hover states
- if (a.id === state.asset?.id) {
- return (
-
- {content}
-
- );
- }
-
return (
);
})}
@@ -371,16 +364,14 @@ const Approval = ({
// No asset selected, show generic approval title
if (!account) {
return (
-
-
- {t('Connect Ethereum wallet')}
-
-
+
+ {t('Connect Ethereum wallet')}
+
);
}
// APPROVED: show muted re-approve button
- if (state.allowance && state.allowance.isGreaterThan(0)) {
+ if (isApproved(state.allowance)) {
return (
@@ -498,6 +489,7 @@ const SendDeposit = ({
refetchBalances();
}
}, [tx?.status, state.asset, refetchBalances]);
+
if (!state.asset) {
return null;
}
@@ -507,12 +499,12 @@ const SendDeposit = ({
}
// Dont show deposit ui unless approved
- if (!state.allowance || state.allowance.isZero()) {
+ if (!isApproved(state.allowance)) {
return null;
}
return (
-