Skip to content

Commit

Permalink
removing msg responses
Browse files Browse the repository at this point in the history
karnthis committed May 17, 2024
1 parent 19ef7a6 commit f65d583
Showing 4 changed files with 7 additions and 16 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jackallabs/banshee",
"version": "0.3.0-alpha.1",
"version": "0.3.0-alpha.2",
"description": "Modern problems require modern solutions",
"keywords": [],
"exports": {
8 changes: 2 additions & 6 deletions src/classes/websocketCore.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { TPossibleTxEvents } from '@/types'
import {
IIbcEngageBundle, IIbcFeedBundle,
IIbcEngageBundle,
IWebsocketCore
} from '@/interfaces'

@@ -61,11 +61,7 @@ export class WebsocketCore implements IWebsocketCore {
return
}
const ready = Responses.decodeTxEvent(data.result) as T
const postProcess: IIbcFeedBundle<T> = {
resp: ready,
parsed: conn.parser(ready)
}
conn.feed.push(postProcess)
conn.feed.push(ready)
} catch (err) {
console.error(err)
}
9 changes: 2 additions & 7 deletions src/interfaces/IIbcBundle.ts
Original file line number Diff line number Diff line change
@@ -5,17 +5,12 @@ import type { TPossibleTxEvents } from '@/types'
* @property {string} chainId
* @property {string} endpoint
* @property {string} [query]
* @property {IIbcFeedBundle<T>[]} feed
* @property {T[]} feed
*/
export interface IIbcEngageBundle<T extends TPossibleTxEvents> {
chainId: string
endpoint: string
parser: (source: T) => any
query?: string
feed: IIbcFeedBundle<T>[]
}

export interface IIbcFeedBundle<T extends TPossibleTxEvents> {
resp: T,
parsed: any
feed: T[]
}

0 comments on commit f65d583

Please sign in to comment.