difftreelog
fix remove extra IF
in: master
1 file changed
tests/src/substrate/substrate-api.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import '../interfaces/augment-api-events';18import {WsProvider, ApiPromise} from '@polkadot/api';17import {ApiPromise, WsProvider} from '@polkadot/api';19import {EventRecord} from '@polkadot/types/interfaces/system/types';18import {ApiOptions, ApiTypes, SubmittableExtrinsic} from '@polkadot/api/types';20import {ExtrinsicStatus} from '@polkadot/types/interfaces/author/types';19import {ExtrinsicStatus} from '@polkadot/types/interfaces/author/types';20import {EventRecord} from '@polkadot/types/interfaces/system/types';21import {IKeyringPair} from '@polkadot/types/types';21import {IKeyringPair} from '@polkadot/types/types';2223import config from '../config';22import config from '../config';24import promisifySubstrate from './promisify-substrate';25import {ApiOptions, SubmittableExtrinsic, ApiTypes} from '@polkadot/api/types';23import '../interfaces/augment-api-events';26import * as defs from '../interfaces/definitions';24import * as defs from '../interfaces/definitions';27import privateKey from './privateKey';25import privateKey from './privateKey';26import promisifySubstrate from './promisify-substrate';272828292988 await promisifySubstrate(api, async () => {88 await promisifySubstrate(api, async () => {89 if (api) {89 if (api) {90 await api.isReadyOrError;90 await api.isReadyOrError;91 const chainProperties = api.registry.getChainProperties();91 const ss58Format = (api.registry.getChainProperties())!.toHuman().ss58Format;92 if (chainProperties) {93 const ss58Format = (chainProperties).toHuman().ss58Format;94 const privateKeyWrapper = (account: string) => privateKey(account, Number(ss58Format));92 const privateKeyWrapper = (account: string) => privateKey(account, Number(ss58Format));95 result = await action(api, privateKeyWrapper);93 result = await action(api, privateKeyWrapper);96 } 97 }94 }98 })();95 })();99 } finally {96 } finally {