Skip to content

Commit

Permalink
Merge pull request #33 from Terran-One/fix/BalancesByStep
Browse files Browse the repository at this point in the history
Fix/balances by step
  • Loading branch information
dabralyogesh authored Jan 27, 2023
2 parents 9077885 + 8e825b4 commit 32d952c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@terran-one/cw-simulate",
"version": "2.8.3",
"version": "2.8.4",
"description": "Mock blockchain environment for simulating CosmWasm interactions",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
5 changes: 3 additions & 2 deletions src/modules/bank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,10 @@ export class BankModule {
}

public getBalance(address: string, storage?: Snapshot): Coin[] {
return this.lens(storage).getObject('balances', address) ?? [];
return this.lens(storage).getObject('balances',address) ?? [];
}


public getBalances() {
return this.store.getObject('balances');
}
Expand Down Expand Up @@ -219,5 +220,5 @@ export class ParsedCoin {
}

export function lensFromSnapshot(snapshot: Snapshot) {
return new Transactional(snapshot).lens<BankData>('contracts');
return new Transactional(snapshot).lens<BankData>('bank');
}

0 comments on commit 32d952c

Please sign in to comment.