We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2fe113 commit e25bdfdCopy full SHA for e25bdfd
src/provider/default.ts
@@ -289,10 +289,10 @@ export class Provider implements ProviderInterface {
289
290
if (res.tx_status === 'ACCEPTED_ON_L1' || res.tx_status === 'ACCEPTED_ON_L2') {
291
onchain = true;
292
- } else if (res.tx_status === 'REJECTED') {
293
- throw Error('REJECTED');
294
- } else if (res.tx_status === 'NOT_RECEIVED') {
295
- throw Error('NOT_RECEIVED');
+ } else if (res.tx_status === 'REJECTED' || res.tx_status === 'NOT_RECEIVED') {
+ const error = Error(res.tx_status) as Error & { response: GetTransactionStatusResponse };
+ error.response = res;
+ throw error;
296
}
297
298
0 commit comments