chore: improve connect wallet button in deal ticket (#1793)
* chore: improve connect wallet button in deal ticket * chore: improve connect wallet button in deal ticket * chore: improve connect wallet button in deal ticket Co-authored-by: maciek <maciek@vegaprotocol.io>
This commit is contained in:
parent
3c0dd55d7c
commit
c15765de79
@ -212,11 +212,6 @@ describe('deal ticket validation', { tags: '@smoke' }, () => {
|
|||||||
cy.getByTestId('order-connect-wallet').should('exist');
|
cy.getByTestId('order-connect-wallet').should('exist');
|
||||||
cy.getByTestId(placeOrderBtn).should('not.exist');
|
cy.getByTestId(placeOrderBtn).should('not.exist');
|
||||||
cy.getByTestId(errorMessage).should('not.exist');
|
cy.getByTestId(errorMessage).should('not.exist');
|
||||||
cy.getByTestId('order-get-vega-wallet').should(
|
|
||||||
'have.attr',
|
|
||||||
'href',
|
|
||||||
'https://github.com/vegaprotocol/vega/releases'
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('must be able to select order direction - long/short', function () {
|
it('must be able to select order direction - long/short', function () {
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
addDecimalsFormatNumber,
|
addDecimalsFormatNumber,
|
||||||
removeDecimal,
|
removeDecimal,
|
||||||
} from '@vegaprotocol/react-helpers';
|
} from '@vegaprotocol/react-helpers';
|
||||||
import { Button, InputError, Link } from '@vegaprotocol/ui-toolkit';
|
import { Button, InputError } from '@vegaprotocol/ui-toolkit';
|
||||||
import { TypeSelector } from './type-selector';
|
import { TypeSelector } from './type-selector';
|
||||||
import { SideSelector } from './side-selector';
|
import { SideSelector } from './side-selector';
|
||||||
import { DealTicketAmount } from './deal-ticket-amount';
|
import { DealTicketAmount } from './deal-ticket-amount';
|
||||||
@ -13,11 +13,7 @@ import { TimeInForceSelector } from './time-in-force-selector';
|
|||||||
import type { DealTicketMarketFragment } from './__generated___/DealTicket';
|
import type { DealTicketMarketFragment } from './__generated___/DealTicket';
|
||||||
import { ExpirySelector } from './expiry-selector';
|
import { ExpirySelector } from './expiry-selector';
|
||||||
import type { OrderSubmissionBody } from '@vegaprotocol/wallet';
|
import type { OrderSubmissionBody } from '@vegaprotocol/wallet';
|
||||||
import {
|
import { useVegaWallet, useVegaWalletDialogStore } from '@vegaprotocol/wallet';
|
||||||
useVegaWallet,
|
|
||||||
useVegaWalletDialogStore,
|
|
||||||
VEGA_WALLET_RELEASE_URL,
|
|
||||||
} from '@vegaprotocol/wallet';
|
|
||||||
import { OrderTimeInForce, OrderType } from '@vegaprotocol/types';
|
import { OrderTimeInForce, OrderType } from '@vegaprotocol/types';
|
||||||
import { getDefaultOrder } from '../deal-ticket-validation';
|
import { getDefaultOrder } from '../deal-ticket-validation';
|
||||||
import {
|
import {
|
||||||
@ -179,25 +175,15 @@ export const DealTicket = ({
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<Button
|
||||||
<Button
|
variant="default"
|
||||||
variant="default"
|
fill
|
||||||
fill
|
type="button"
|
||||||
type="button"
|
data-testid="order-connect-wallet"
|
||||||
data-testid="order-connect-wallet"
|
onClick={openVegaWalletDialog}
|
||||||
onClick={openVegaWalletDialog}
|
>
|
||||||
className="!text-sm !px-1 !py-1"
|
{t('Connect wallet')}
|
||||||
>
|
</Button>
|
||||||
{t('Connect your Vega wallet to trade')}
|
|
||||||
</Button>
|
|
||||||
<Link
|
|
||||||
data-testid="order-get-vega-wallet"
|
|
||||||
className="block w-full text-center mt-2 text-neutral-500 dark:text-neutral-400"
|
|
||||||
href={VEGA_WALLET_RELEASE_URL}
|
|
||||||
>
|
|
||||||
{t('Get a Vega Wallet')}
|
|
||||||
</Link>
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user