fix: wallet errors incorrectly showing as user rejections (#1737)
This commit is contained in:
parent
cb92a30015
commit
dee0b016eb
@ -254,7 +254,7 @@ export class JsonRpcConnector implements VegaConnector {
|
||||
} else {
|
||||
// In the case of sending a tx, return null instead of throwing
|
||||
// this indicates to the app that the user rejected the tx rather
|
||||
// than it being a true erroor
|
||||
// than it being a true error
|
||||
if ('error' in result && result.error.code === 3001) {
|
||||
return null;
|
||||
}
|
||||
|
@ -162,7 +162,6 @@ export class RestConnector implements VegaConnector {
|
||||
}
|
||||
|
||||
async sendTx(pubKey: string, transaction: Transaction) {
|
||||
try {
|
||||
const body = {
|
||||
pubKey,
|
||||
propagate: true,
|
||||
@ -194,10 +193,6 @@ export class RestConnector implements VegaConnector {
|
||||
receivedAt: data.receivedAt,
|
||||
sentAt: data.sentAt,
|
||||
};
|
||||
} catch (err) {
|
||||
Sentry.captureException(err);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** Parse more complex error object into a single string */
|
||||
|
Loading…
Reference in New Issue
Block a user