Pegged order not returning rejected status
tamlyn10 opened this issue · 7 comments
Thanks, if you have no collateral, the core will give a rejection for this (margin_check_failed). I can check what's going on, were you on testnet?
Well, if you don’t have any kind of asset deposited on vega, the transaction will be rejected on the tendermint pool, and will not even reach the core, at which point it could eventually be rejected.
I would guess your script is waiting for the order to come from the event bus which will never happen?
Im investigating, will confirm what's going on and update ticket.
So from what @jeremyletang says, we might now reject orders before they even hit a core for no asset, I can add an asset check to the scripts on that repo, but this problem will hit others trying to get started with Vega.
I can replicate this (for pub key with no assets), the signed pegged order is prepared, signed and sent successfully via the wallet service. At which point it disappears, or more accurately it does not show up when polling the orderByReference endpoint.
Need to switch the wallet call to use sync transaction mode when sending in to tendermint for rejection reason of kind "No assets found for pubkey", rejection reasons that are set by the core will be returned already - e.g. market closed etc. Same as #58
Easy fix - change samples to use call:
/api/v1/messages/sync