Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6c048e2e2 | ||
|
|
86227a43eb | ||
|
|
ad058d8b5f | ||
|
|
1aaf97478b |
@@ -49,15 +49,15 @@ export const WithdrawButtonAndReceipt = ({
|
|||||||
const [isEditingSlippage, setIsEditingSlipapge] = useState(false);
|
const [isEditingSlippage, setIsEditingSlipapge] = useState(false);
|
||||||
const stringGetter = useStringGetter();
|
const stringGetter = useStringGetter();
|
||||||
|
|
||||||
// TODO: uncomment when we have a way to get token amount estimate from abacus
|
const { balance, queryStatus } = useAccountBalance({
|
||||||
// const { balance, queryStatus } = useAccountBalance({
|
addressOrDenom: withdrawToken?.address || undefined,
|
||||||
// addressOrDenom: withdrawToken?.address || undefined,
|
assetSymbol: withdrawToken?.symbol || undefined,
|
||||||
// assetSymbol: withdrawToken?.symbol || undefined,
|
chainId: withdrawChain ? parseInt(withdrawChain) : undefined,
|
||||||
// chainId: withdrawChain ? parseInt(withdrawChain) : undefined,
|
decimals: withdrawToken?.decimals || undefined,
|
||||||
// decimals: withdrawToken?.decimals || undefined,
|
isCosmosChain: false,
|
||||||
// isCosmosChain: false,
|
});
|
||||||
// });
|
|
||||||
|
|
||||||
|
// TODO: uncomment when we have a way to get token amount estimate from abacus
|
||||||
// const balanceBN = MustBigNumber(balance);
|
// const balanceBN = MustBigNumber(balance);
|
||||||
// const newBalance =
|
// const newBalance =
|
||||||
// // toAmountMin && withdrawToken && parseUnits(toAmountMin, withdrawToken.decimals).toString();
|
// // toAmountMin && withdrawToken && parseUnits(toAmountMin, withdrawToken.decimals).toString();
|
||||||
@@ -158,7 +158,7 @@ export const WithdrawButtonAndReceipt = ({
|
|||||||
// },
|
// },
|
||||||
];
|
];
|
||||||
|
|
||||||
const isFormValid = !isDisabled && !isEditingSlippage;
|
const isFormValid = !isDisabled && !isEditingSlippage && queryStatus !== 'error';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Styled.WithReceipt
|
<Styled.WithReceipt
|
||||||
|
|||||||
Reference in New Issue
Block a user