Skip to content

Commit 405bee1

Browse files
authored
Utilize raw data (#27)
* Use `json: false` and handle serialization internally * New test data * Adjusting tests to be less specific, but still cover same concerns
1 parent 4b4518c commit 405bee1

File tree

158 files changed

+81549
-430802
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+81549
-430802
lines changed

src/contract/table-cursor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export class TableCursor<TableRow> {
108108
lower_bound: wrapIndexValue(lower_bound),
109109
upper_bound: wrapIndexValue(upper_bound),
110110
index_position: indexPosition,
111+
json: false,
111112
})
112113

113114
let {rows} = result
@@ -121,7 +122,7 @@ export class TableCursor<TableRow> {
121122

122123
rows = rows.map((row) =>
123124
Serializer.decode({
124-
object: row,
125+
data: row,
125126
abi: this.table.contract.abi,
126127
type: this.table.abi.type,
127128
})

src/contract/table.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,15 @@ export class Table<TableRow extends ABISerializableConstructor = ABISerializable
145145
upper_bound: wrapIndexValue(queryValue),
146146
index_position: index ? fieldToIndexMapping[index].index_position : 'primary',
147147
key_type: key_type,
148+
json: false,
148149
}
149150

150151
let {rows} = await this.contract.client!.v1.chain.get_table_rows(tableRowsParams)
151152

152153
if (!this.rowType) {
153154
rows = [
154155
Serializer.decode({
155-
object: rows[0],
156+
data: rows[0],
156157
abi: this.contract.abi,
157158
type: this.abi.type,
158159
}),

test/data/requests/05c860767fe3bc6c754afcb4a1d295aac38e7860.json

Lines changed: 1017 additions & 0 deletions
Large diffs are not rendered by default.

test/data/requests/06ce88b52f6914cb9f33c441ceac2a681472deac.json

Lines changed: 0 additions & 116 deletions
This file was deleted.

0 commit comments

Comments
 (0)