Use rpc-rx internally to api-promise (#539)

* Use rpc-rx internally to api-promise

* Don't swallow errors

* Remove unused imports
This commit is contained in:
Jaco Greeff
2019-01-07 15:44:15 +01:00
committed by GitHub
parent f2748347c5
commit 70ff3c5dfc
5 changed files with 26 additions and 36 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { RpcInterface$Section, RpcInterface$Section$Method } from '@polkadot/rpc-core/types';
import { RpcInterface$Method, RpcInterface$Section } from '@polkadot/rpc-core/types';
import { ProviderInterface } from '@polkadot/rpc-provider/types';
import { RpcRxInterface, RpcRxInterface$Events, RpcRxInterface$Section } from './types';
@@ -174,7 +174,7 @@ export default class RpcRx implements RpcRxInterface {
};
}
private createReplayUnsub (fn: RpcInterface$Section$Method, subscribe: Promise<number>, subName: string, paramStr: string): () => void {
private createReplayUnsub (fn: RpcInterface$Method, subscribe: Promise<number>, subName: string, paramStr: string): () => void {
return (): void => {
subscribe
.then((subscriptionId: number) =>