Expose isConnected on api (#78)
* Expose isConnected on api * Revert isConnected & .on exposure
This commit is contained in:
@@ -16,9 +16,7 @@ const createInterface = require('./create/interface');
|
||||
module.exports = function api (provider: ProviderInterface): ApiInterface {
|
||||
assert(provider && isFunction(provider.send), 'Expected Provider to API create');
|
||||
|
||||
const exposed: ApiInterface = {
|
||||
on: provider.on
|
||||
};
|
||||
const exposed: ApiInterface = {};
|
||||
|
||||
return Object
|
||||
.keys(interfaces)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
// @flow
|
||||
|
||||
import type { InterfaceTypes } from '@polkadot/api-jsonrpc/types';
|
||||
import type { ProviderInterface$Emitted, ProviderInterface$EmitCb } from '@polkadot/api-provider/types';
|
||||
|
||||
export type ApiInterface$Section$Method = {
|
||||
(...params: Array<mixed>): Promise<mixed>;
|
||||
@@ -16,6 +15,5 @@ export type ApiInterface$Section = {
|
||||
};
|
||||
|
||||
export type ApiInterface = {
|
||||
on: (type: ProviderInterface$Emitted, callback: ProviderInterface$EmitCb) => void,
|
||||
[InterfaceTypes]: ApiInterface$Section
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user