Commit ca7d65db authored by smartcontracts's avatar smartcontracts Committed by GitHub

fix[dtl]: remove old stringification function (#1134)

* fix[dtl]: remove old stringification function

* chore: add changeset
parent 3282be21
---
'@eth-optimism/data-transport-layer': patch
---
Removes a function that was previously used for backwards compatibility but is no longer necessary
......@@ -387,27 +387,6 @@ export class TransportDB {
startIndex: number,
endIndex: number
): Promise<TEntry[] | []> {
const entries = await this.db.range<TEntry>(
`${key}:index`,
startIndex,
endIndex
)
const results = []
for (const entry of entries) {
results.push(stringify(entry))
}
return results
}
}
const stringify = (entry) => {
if (entry === null || entry === undefined) {
return entry
}
if (entry.gasLimit) {
entry.gasLimit = BigNumber.from(entry.gasLimit).toString()
}
if (entry.decoded) {
entry.decoded.gasLimit = BigNumber.from(entry.decoded.gasLimit).toString()
return this.db.range<TEntry>(`${key}:index`, startIndex, endIndex)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment