Skip to content

Commit

Permalink
wip: feat(namada): decoding transactions from rust/wasm, pt.5
Browse files Browse the repository at this point in the history
  • Loading branch information
egasimus committed Mar 13, 2024
1 parent 7306768 commit 149ecdc
Show file tree
Hide file tree
Showing 4 changed files with 810 additions and 626 deletions.
10 changes: 5 additions & 5 deletions packages/namada/namada-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export class NamadaConnection extends CW.Connection {
const txsDecoded: NamadaTransaction[] = []
const {txs} = (block as { txs: Uint8Array[] })
for (const i in txs) {
const decoded = this.decode.tx(txs[i].slice(3))
txsDecoded[i] = new NamadaTransaction(decoded)
const decoded = Decode.tx(txs[i].slice(3)) as any
txsDecoded[i] = NamadaTransaction.fromDecoded(decoded)
}
Object.assign(block, { txsDecoded })
return block as typeof block & { txsDecoded: NamadaTransaction[] }
Expand All @@ -72,7 +72,7 @@ export class NamadaConnection extends CW.Connection {
return getPGFFundings(this)
}

isPGFSteward (address: CW.Core.Address) {
isPGFSteward (address: string) {
return isPGFSteward(this)
}

Expand Down Expand Up @@ -101,7 +101,7 @@ export class NamadaConnection extends CW.Connection {
return getValidatorsBelowCapacity(this)
}

getValidator (address: CW.Core.Address) {
getValidator (address: string) {
return getValidator(this, address)
}

Expand All @@ -125,7 +125,7 @@ export class NamadaConnection extends CW.Connection {
return getTotalStaked(this)
}

getValidatorStake(address: CW.Core.Address) {
getValidatorStake (address: string) {
return getValidatorStake(this, address)
}
}
Loading

0 comments on commit 149ecdc

Please sign in to comment.