Skip to content

chore: consistent object create and remove todo #1020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 15, 2023
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