Skip to content

Commit

Permalink
fix(contract events): don't throw error if events emitted by remote
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Jan 28, 2022
1 parent 899f4e5 commit fa1c569
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/integration/contract-aci.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,17 @@ describe('Contract instance', function () {
}
}])
})

it('calls a contract that emits events with no defined events', async () => {
const contract = await sdk.getContractInstance({
source:
'contract FooContract =\n' +
' entrypoint emitEvents(f: bool) = ()',
contractAddress: remoteContract.deployInfo.address
})
const result = await contract.methods.emitEvents(false, { omitUnknown: true })
expect(result.decodedEvents).to.be.eql([])
})
})

describe('Arguments Validation and Casting', function () {
Expand Down

0 comments on commit fa1c569

Please sign in to comment.