git.delta.rocks / unique-network / refs/commits / 6c1065a66823

difftreelog

Code style and format

Greg Zaitsev2021-07-27parent: #793a35d.patch.diff
in: master

10 files changed

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth

no syntactic changes

modifiedpallets/nft/src/tests.rsdiffbeforeafterboth
--- a/pallets/nft/src/tests.rs
+++ b/pallets/nft/src/tests.rs
@@ -2387,7 +2387,9 @@
 		let origin1 = Origin::signed(1);
 
 		let collection_id = create_test_collection(&CollectionMode::NFT, 1);
-		assert_ok!(TemplateModule::set_transfers_enabled_flag(origin1, 1, false));
+		assert_ok!(TemplateModule::set_transfers_enabled_flag(
+			origin1, 1, false
+		));
 
 		let data = default_nft_data();
 		create_test_item(collection_id, &data.into());
modifiedruntime/src/lib.rsdiffbeforeafterboth
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -154,7 +154,7 @@
 	transaction_version: 1,
 };
 
-pub const MILLISECS_PER_BLOCK: u64 = 12000;
+pub const MILLISECS_PER_BLOCK: u64 = 1200;
 
 pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;
 
modifiedtests/src/change-collection-owner.test.tsdiffbeforeafterboth
--- a/tests/src/change-collection-owner.test.ts
+++ b/tests/src/change-collection-owner.test.ts
@@ -7,7 +7,7 @@
 import chaiAsPromised from 'chai-as-promised';
 import privateKey from './substrate/privateKey';
 import { default as usingApi, submitTransactionAsync, submitTransactionExpectFailAsync } from './substrate/substrate-api';
-import { createCollectionExpectSuccess, normalizeAccountId } from './util/helpers';
+import { createCollectionExpectSuccess } from './util/helpers';
 
 chai.use(chaiAsPromised);
 const expect = chai.expect;
modifiedtests/src/enableDisableTransfer.test.tsdiffbeforeafterboth
--- a/tests/src/enableDisableTransfer.test.ts
+++ b/tests/src/enableDisableTransfer.test.ts
@@ -12,7 +12,7 @@
   createCollectionExpectSuccess,
   transferExpectSuccess,
   transferExpectFailure,
-  setTransferFlagExpectSuccess
+  setTransferFlagExpectSuccess,
 } from './util/helpers';
 
 chai.use(chaiAsPromised);
modifiedtests/src/pallet-presence.test.tsdiffbeforeafterboth
--- a/tests/src/pallet-presence.test.ts
+++ b/tests/src/pallet-presence.test.ts
@@ -32,14 +32,14 @@
   'nft',
   'scheduler',
   'nftpayment',
-  'charging'
+  'charging',
 ];
 
 // Pallets that depend on consensus and governance configuration
 const consensusPallets = [
   'sudo',
   'aura',
-  'auraext'
+  'auraext',
 ];
 
 describe('Pallet presence', () => {
modifiedtests/src/setConstOnChainSchema.test.tsdiffbeforeafterboth
--- a/tests/src/setConstOnChainSchema.test.ts
+++ b/tests/src/setConstOnChainSchema.test.ts
@@ -11,7 +11,6 @@
 import {
   createCollectionExpectSuccess,
   destroyCollectionExpectSuccess,
-  normalizeAccountId,
 } from './util/helpers';
 
 chai.use(chaiAsPromised);
modifiedtests/src/setVariableOnChainSchema.test.tsdiffbeforeafterboth
--- a/tests/src/setVariableOnChainSchema.test.ts
+++ b/tests/src/setVariableOnChainSchema.test.ts
@@ -11,7 +11,6 @@
 import {
   createCollectionExpectSuccess,
   destroyCollectionExpectSuccess,
-  normalizeAccountId,
 } from './util/helpers';
 
 chai.use(chaiAsPromised);
modifiedtests/src/substrate/substrate-api.tsdiffbeforeafterboth
--- a/tests/src/substrate/substrate-api.ts
+++ b/tests/src/substrate/substrate-api.ts
@@ -48,12 +48,12 @@
   console.warn = outFn;
 
   try {
-   await promisifySubstrate(api, async () => {
+    await promisifySubstrate(api, async () => {
       if (api) {
         await api.isReadyOrError;
         result = await action(api);
       }
-   })();
+    })();
   } finally {
     await api.disconnect();
     console.error = consoleErr;
modifiedtests/src/util/helpers.tsdiffbeforeafterboth
--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -555,7 +555,7 @@
   });
 }
 
-export async function toggleContractWhitelistExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, value: boolean = true) {
+export async function toggleContractWhitelistExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, value = true) {
   await usingApi(async (api) => {
     const tx = api.tx.nft.toggleContractWhiteList(contractAddress, value);
     const events = await submitTransactionAsync(sender, tx);
@@ -761,7 +761,7 @@
   recipient: IKeyringPair,
   value: number | bigint = 1,
   blockTimeMs: number,
-  blockSchedule: number
+  blockSchedule: number,
 ) {
   await usingApi(async (api: ApiPromise) => {
     const blockNumber: number | undefined = await getBlockNumber(api);