Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const paths: HttpProviderConfigPaths<TxSubmitProvider> = {
const toTxSubmissionError = (error: any): TxSubmissionError | GeneralCardanoNodeError | null => {
if (typeof error === 'object' && error !== null && typeof error?.message === 'string') {
if (CardanoNodeUtil.isTxSubmissionErrorCode(error.code)) {
return Object.setPrototypeOf(error, TxSubmissionError.prototype);
return new TxSubmissionError(error.code, error.data, error.message);
}

if (CardanoNodeUtil.isGeneralCardanoNodeErrorCode(error.code)) {
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/CardanoNode/util/cardanoNodeErrors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import {
} from '../types';
import { isProductionEnvironment, stripStackTrace } from '@cardano-sdk/util';

// TODO: test all new utils

type InferObjectType<T> = T extends new (...args: any[]) => infer O ? O : never;

const asSpecificCardanoNodeError =
Expand Down