From ae45281817916e9b6a05c54e0d1aed7ab9f7c20d Mon Sep 17 00:00:00 2001 From: Viterbo Date: Wed, 25 Oct 2023 18:27:28 -0300 Subject: [PATCH] addressing feedback --- src/antelope/mocks/AccountStore.ts | 2 +- src/antelope/mocks/AntelopeConfig.ts | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/antelope/mocks/AccountStore.ts b/src/antelope/mocks/AccountStore.ts index e9dda5037..f525dd7b0 100644 --- a/src/antelope/mocks/AccountStore.ts +++ b/src/antelope/mocks/AccountStore.ts @@ -119,7 +119,7 @@ class AccountStore { return tx; } catch (error) { - const trxError = ant.config.wrapError(actionError, error); + const trxError = ant.config.transactionError(actionError, error); ant.config.transactionErrorHandler(trxError, funcname); throw trxError; } finally { diff --git a/src/antelope/mocks/AntelopeConfig.ts b/src/antelope/mocks/AntelopeConfig.ts index 77f66b0cf..9f80070b1 100644 --- a/src/antelope/mocks/AntelopeConfig.ts +++ b/src/antelope/mocks/AntelopeConfig.ts @@ -21,7 +21,7 @@ export class AntelopeWallets { export class AntelopeConfig { // @TODO rename this method, it's used for token and NFT transfers as well - wrapError(description: string, error: unknown): AntelopeError { + transactionError(description: string, error: unknown): AntelopeError { if (error instanceof AntelopeError) { return error as AntelopeError; } @@ -265,16 +265,6 @@ export class AntelopeConfig { } const config = new AntelopeConfig(); - - - -// const config = { -// notifyNeutralMessageHandler: (message: string) => void 0, -// localizationHandler: (message: string, params?: Record) => message, -// notifyFailureWithActionHandler: (message: string, action: () => void) => void 0, -// notifyFailureWithAction: (message: string, params?: { label: string; handler: () => void; }) => void 0, -// }; - const wallets = new AntelopeWallets(); const Antelope = { config,