s/contract/contracts/ on applyOnEvent (#2712)

* s/contract/contracts/ on applyOnEvent

* Expose result classes
This commit is contained in:
Jaco Greeff
2020-10-12 14:36:47 +02:00
committed by GitHub
parent 3ba0b2e0d8
commit 8a8b6f7ac8
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ export function formatData (registry: Registry, data: Raw, { type }: TypeDef): C
export function applyOnEvent <T> (result: SubmittableResult, type: 'CodeStored' | 'Instantiated', fn: (record: EventRecord) => T): T | undefined {
if (result.isInBlock || result.isFinalized) {
const record = result.findRecord('contract', type);
const record = result.findRecord('contracts', type);
if (record) {
return fn(record);