Update @polkadot/types (#105)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the ISC license. See the LICENSE file for details.
|
||||
|
||||
import { Interface$Sections } from '@polkadot/jsonrpc/types';
|
||||
import { ProviderInterface } from '@polkadot/api-provider/types';
|
||||
import { RxApiInterface } from './types';
|
||||
|
||||
@@ -15,11 +16,10 @@ import createInterface from './interface';
|
||||
|
||||
export default function rxApi (provider: ProviderInterface = createWs(defaults.WS_URL)): RxApiInterface {
|
||||
const api = createApi(provider);
|
||||
const exposed = createExposed(provider);
|
||||
|
||||
return [...interfaces.keys()].reduce((result, type) => {
|
||||
result[type] = createInterface(api, type);
|
||||
return Object.keys(interfaces).reduce((result, type) => {
|
||||
result[type as Interface$Sections] = createInterface(api, type as Interface$Sections);
|
||||
|
||||
return result;
|
||||
}, exposed);
|
||||
}, createExposed(provider));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user