mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 13:24:01 +01:00
Fix error formatting on core only backend
This commit is contained in:
parent
ae46fcafb9
commit
93d9538845
@ -59,7 +59,7 @@ export class PushTransactionComponent implements OnInit {
|
||||
},
|
||||
(error) => {
|
||||
if (typeof error.error === 'string') {
|
||||
const matchText = error.error.match('"message":"(.*?)"');
|
||||
const matchText = error.error.replace(/\\/g, '').match('"message":"(.*?)"');
|
||||
this.error = 'Failed to broadcast transaction, reason: ' + (matchText && matchText[1] || error.error);
|
||||
} else if (error.message) {
|
||||
this.error = 'Failed to broadcast transaction, reason: ' + error.message;
|
||||
|
@ -74,7 +74,7 @@ export class TestTransactionsComponent implements OnInit {
|
||||
},
|
||||
(error) => {
|
||||
if (typeof error.error === 'string') {
|
||||
const matchText = error.error.match('"message":"(.*?)"');
|
||||
const matchText = error.error.replace(/\\/g, '').match('"message":"(.*?)"');
|
||||
this.error = matchText && matchText[1] || error.error;
|
||||
} else if (error.message) {
|
||||
this.error = error.message;
|
||||
|
Loading…
Reference in New Issue
Block a user