Skip to content

Commit

Permalink
feat(namada): add raw data to block
Browse files Browse the repository at this point in the history
  • Loading branch information
ivaylonikolov7 committed May 15, 2024
1 parent 3a1905d commit 54f468f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/namada/namada-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ export class NamadaConnection extends CW.Connection {
height: header.height,
timestamp: header.time,
transactions: decodeTxs(txs, header.height),
blockRaw: block,
resultsRaw: results,
rawTransactions: [],
})
} else if ('hash' in parameter) {
Expand Down
8 changes: 7 additions & 1 deletion packages/namada/namada-tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,23 @@ import { Transaction } from './namada-tx-base'

export class NamadaBlock extends Block {
constructor ({
header, rawTransactions, ...properties
header, rawTransactions, blockRaw, resultsRaw, ...properties
}: ConstructorParameters<typeof Block>[0] & {
header: object
blockRaw:string,
resultsRaw:string,
}
& Pick<NamadaBlock, 'rawTransactions'>
) {
super(properties)
this.rawTransactions = rawTransactions
this.header = header
this.blockRaw = blockRaw
this.resultsRaw = resultsRaw
}
declare transactions: Transaction[]
rawTransactions?: unknown[]
header: object
blockRaw: string
resultsRaw: string
}

0 comments on commit 54f468f

Please sign in to comment.