* Additional check for API connection & decoration in contracts * Remove snuck-in-file
20 lines
454 B
TypeScript
20 lines
454 B
TypeScript
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import { ApiBase } from '@polkadot/api/base';
|
|
import { TypeRegistry } from '@polkadot/types';
|
|
|
|
const registry = new TypeRegistry();
|
|
|
|
export const mockApi = {
|
|
isConnected: true,
|
|
registry,
|
|
tx: {
|
|
contracts: {
|
|
instantiateWithCode: (): never => {
|
|
throw new Error('mock');
|
|
}
|
|
}
|
|
}
|
|
} as unknown as ApiBase<'promise'>;
|