vegaprotocol / frontend-monorepo

Toolkit for building apps that interact with Vega
https://vega.xyz
MIT License
21 stars 14 forks source link

Add explorer link to TX that fails due to lack of fund #6369

Open daunatv opened 2 weeks ago

daunatv commented 2 weeks ago

Description

Creating a stop order on a spot market for more than what your account can cover, makes the Toast show up as green and the explorer as a success, but you cannot perform that order and it fails so console trades shows as internal error.

Steps to Reproduce

  1. Go to spot market and put a stop limit order with a value of more assets than you have (and make it trigger directly)
  2. Check toast and explorer link

REVISED DESCRIPTION

After some changes made in another ticket the behaviour here is now a bit different.

It is now the case that

  1. The user gets a warning they dont have enough cash

Image

  1. The user tries to make the TX anyway and gets this error back after approving in wallet ... which we're pretty sure is an error from the network but cant 100% confirm because testnet explorer is not behaving at the moment.... but this should have been the TX: https://explorer.fairground.wtf/txs/205FC5AEFDCCE8BB08F51189A5081E591C2DCE42F7E914CFC93155A27A9390E5

Image

Expected behavior

Behaviour is now pretty good... BUT we should:

Screenshots

Screenshot 2024-05-02 at 14 31 52

https://github.com/vegaprotocol/frontend-monorepo/assets/100769129/57793257-ce22-47b8-b75b-a8e0398b8b10