git.delta.rocks / unique-network / refs/commits / d17fd85bed11

difftreelog

fix remove extra IF

h3lpkey2022-06-01parent: #05870fc.patch.diff
in: master

1 file changed

modifiedtests/src/substrate/substrate-api.tsdiffbeforeafterboth
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// 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/>.
1616
17import '../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';
22
23import 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';
27
2828
2929
88 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 {