Skip to content

Commit

Permalink
Fixed scope logic
Browse files Browse the repository at this point in the history
It was casting undefined to a string and never using `this.account`
  • Loading branch information
aaroncox committed Aug 22, 2023
1 parent 1d1b64f commit 69a3295
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/contract/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class Table<RowType = any> {
// Table query
table: this.name,
code: this.account,
scope: String(params.scope) || this.account,
scope: params.scope !== undefined ? String(params.scope) : this.account,
// Response typing
type: this.rowType,
// Filtering
Expand Down Expand Up @@ -151,7 +151,7 @@ export class Table<RowType = any> {
const tableRowsParams = {
table: this.name,
code: this.account,
scope: String(params.scope) || this.account,
scope: params.scope !== undefined ? String(params.scope) : this.account,
type: this.rowType!,
limit: 1,
lower_bound: wrapIndexValue(value),
Expand Down

0 comments on commit 69a3295

Please sign in to comment.