Skip to content

Commit e078faa

Browse files
committed
chore: consistent object create and remove todo
1 parent 0da7b19 commit e078faa

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

packages/cardano-services-client/src/TxSubmitProvider/txSubmitHttpProvider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const paths: HttpProviderConfigPaths<TxSubmitProvider> = {
3232
const toTxSubmissionError = (error: any): TxSubmissionError | GeneralCardanoNodeError | null => {
3333
if (typeof error === 'object' && error !== null && typeof error?.message === 'string') {
3434
if (CardanoNodeUtil.isTxSubmissionErrorCode(error.code)) {
35-
return Object.setPrototypeOf(error, TxSubmissionError.prototype);
35+
return new TxSubmissionError(error.code, error.data, error.message);
3636
}
3737

3838
if (CardanoNodeUtil.isGeneralCardanoNodeErrorCode(error.code)) {

packages/core/src/CardanoNode/util/cardanoNodeErrors.ts

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import {
1414
} from '../types';
1515
import { isProductionEnvironment, stripStackTrace } from '@cardano-sdk/util';
1616

17-
// TODO: test all new utils
18-
1917
type InferObjectType<T> = T extends new (...args: any[]) => infer O ? O : never;
2018

2119
const asSpecificCardanoNodeError =

0 commit comments

Comments
 (0)