Skip to content

Commit

Permalink
constructor changed
Browse files Browse the repository at this point in the history
  • Loading branch information
volovyks committed Jun 2, 2022
1 parent afcbeff commit e1b0955
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/lockable-fungible-token/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function assert(b, str) {
}

class Account {
constructor({ balance, allowances, lockedBalances }) {
constructor(balance, allowances, lockedBalances) {
this.balance = balance // Current unlocked balance
this.allowances = allowances // Allowed account to the allowance amount
this.lockedBalances = lockedBalances // Allowed account to locked balance
Expand Down Expand Up @@ -77,7 +77,7 @@ class LockableFungibleToken extends NearContract {
getAccount({ ownerId }) {
let account = this.accounts.get(ownerId)
if (account === null) {
return new Account({ balance: 0, allowances: {}, lockedBalances: {} })
return new Account(0, {}, {})
}
return Object.assign(new Account, JSON.parse(account))
}
Expand Down

0 comments on commit e1b0955

Please sign in to comment.