From f97b2b4e9df74955cbaa6aab1d958fe4ecd0eb04 Mon Sep 17 00:00:00 2001 From: Aaron Barnard Date: Fri, 12 Feb 2021 13:34:52 +1100 Subject: [PATCH 1/2] 3.1.0-0.0.1: [fix] - Add Event Codes (#105) * Add missing event codes * Increment version --- package.json | 2 +- src/interfaces.ts | 1 + src/utilities.ts | 11 ++++++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ab9cb6b..0ab631f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bnc-sdk", - "version": "3.1.0", + "version": "3.1.0-0.0.1", "description": "SDK to connect to the blocknative backend via a websocket connection", "keywords": [ "ethereum", diff --git a/src/interfaces.ts b/src/interfaces.ts index e94a0df..0312e56 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -188,6 +188,7 @@ export type TransactionEventCode = | 'txSendFail' | 'txError' | 'txUnderPriced' + | 'txDropped' | 'all' export interface Ac { diff --git a/src/utilities.ts b/src/utilities.ts index 9580f63..8a1372d 100644 --- a/src/utilities.ts +++ b/src/utilities.ts @@ -13,11 +13,20 @@ export function createEmitter(): Emitter { case 'txSpeedUp': case 'txCancel': case 'txFailed': + case 'txDropped': + case 'txRequest': + case 'nsfFail': + case 'txRepeat': + case 'txAwaitingApproval': + case 'txConfirmReminder': + case 'txSendFail': + case 'txError': + case 'txUnderPriced': case 'all': break default: throw new Error( - `${eventCode} is not a valid event code, for a list of valid event codes see: https://github.com/blocknative/sdk` + `${eventCode} is not a valid event code, for a list of valid event codes see: https://docs.blocknative.com/notify-sdk#event-codes` ) } From bd04a2c795b32448ebd98de7ce50febd570db12b Mon Sep 17 00:00:00 2001 From: Aaron Date: Fri, 12 Feb 2021 13:36:04 +1100 Subject: [PATCH 2/2] Increment version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0ab631f..b09560f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bnc-sdk", - "version": "3.1.0-0.0.1", + "version": "3.1.1", "description": "SDK to connect to the blocknative backend via a websocket connection", "keywords": [ "ethereum",