Skip to content

Commit

Permalink
fix: error handling on gas station
Browse files Browse the repository at this point in the history
  • Loading branch information
KristinaSpasevska committed Jan 11, 2024
1 parent a96395c commit 58f1935
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ const CrossChainTransferFinisher: FC = () => {
const watchGasPayer = watch('gasPayer');

const isGasStation = watchGasPayer === 'kadena-xchain-gas';
const disabledSubmit = !isGasStation || processingTx;
const isAdvancedOptions = devOption !== 'BASIC';
const showInputError =
pollResults.error === undefined ? undefined : 'negative';
Expand Down Expand Up @@ -474,7 +473,7 @@ const CrossChainTransferFinisher: FC = () => {
id: 'gas-payer-account-input',
placeholder: t('Enter Your Account'),
}}
error={errors.gasPayer}
error={!isGasStation ? { message: 'Please enter kadena-xchain-gas', type: 'gas-station'} : errors.gasPayer}
/>
</GridItem>
</Grid>
Expand Down Expand Up @@ -528,7 +527,7 @@ const CrossChainTransferFinisher: FC = () => {
</Stack>
</section>
<section className={formButtonStyle}>
<Button type="submit" disabled={disabledSubmit} icon="TrailingIcon">
<Button type="submit" disabled={processingTx} icon="TrailingIcon">
{t('Finish Transaction')}
</Button>
</section>
Expand Down

0 comments on commit 58f1935

Please sign in to comment.