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
+4
View File
@@ -1,6 +1,10 @@
// Copyright 2017-2020 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { CodeSubmittableResult } from './base/Code';
export { BlueprintSubmittableResult } from './base/Blueprint';
export { default as Abi } from './Abi';
export * from './rx';
export * from './promise';
+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);