diff --git a/package-lock.json b/package-lock.json index 0bd9609..711b2b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@terran-one/cw-simulate", - "version": "2.8.3", + "version": "2.8.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@terran-one/cw-simulate", - "version": "2.8.3", + "version": "2.8.4", "license": "MIT", "dependencies": { "@cosmjs/amino": "^0.28.13", diff --git a/package.json b/package.json index 4c3e320..ae07473 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/modules/bank.ts b/src/modules/bank.ts index d50644b..ebe3304 100644 --- a/src/modules/bank.ts +++ b/src/modules/bank.ts @@ -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'); } @@ -219,5 +220,5 @@ export class ParsedCoin { } export function lensFromSnapshot(snapshot: Snapshot) { - return new Transactional(snapshot).lens('contracts'); + return new Transactional(snapshot).lens('bank'); }