Skip to content

Commit 8a8b6f7

Browse files
authored
s/contract/contracts/ on applyOnEvent (#2712)
* s/contract/contracts/ on applyOnEvent * Expose result classes
1 parent 3ba0b2e commit 8a8b6f7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/api-contract/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// Copyright 2017-2020 @polkadot/api-contract authors & contributors
22
// SPDX-License-Identifier: Apache-2.0
33

4+
export { CodeSubmittableResult } from './base/Code';
5+
export { BlueprintSubmittableResult } from './base/Blueprint';
6+
47
export { default as Abi } from './Abi';
8+
59
export * from './rx';
610
export * from './promise';

packages/api-contract/src/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function formatData (registry: Registry, data: Raw, { type }: TypeDef): C
1616

1717
export function applyOnEvent <T> (result: SubmittableResult, type: 'CodeStored' | 'Instantiated', fn: (record: EventRecord) => T): T | undefined {
1818
if (result.isInBlock || result.isFinalized) {
19-
const record = result.findRecord('contract', type);
19+
const record = result.findRecord('contracts', type);
2020

2121
if (record) {
2222
return fn(record);

0 commit comments

Comments
 (0)