This commit is contained in:
Jaco Greeff
2019-09-05 12:00:38 +02:00
committed by GitHub
parent aa4dd63e2c
commit a0c6cd558e
12 changed files with 256 additions and 252 deletions
+1 -1
View File
@@ -32,6 +32,6 @@
"@polkadot/types": "^0.91.0-beta.21"
},
"devDependencies": {
"@polkadot/keyring": "^1.2.0-beta.6"
"@polkadot/keyring": "^1.2.0-beta.7"
}
}
+3 -3
View File
@@ -28,10 +28,10 @@
"dependencies": {
"@babel/runtime": "^7.5.5",
"@polkadot/types": "^0.91.0-beta.21",
"@polkadot/util": "^1.2.0-beta.6",
"@polkadot/util-crypto": "^1.2.0-beta.6"
"@polkadot/util": "^1.2.0-beta.7",
"@polkadot/util-crypto": "^1.2.0-beta.7"
},
"devDependencies": {
"@polkadot/keyring": "^1.2.0-beta.6"
"@polkadot/keyring": "^1.2.0-beta.7"
}
}
+2 -2
View File
@@ -32,9 +32,9 @@
"@polkadot/rpc-core": "^0.91.0-beta.21",
"@polkadot/rpc-provider": "^0.91.0-beta.21",
"@polkadot/types": "^0.91.0-beta.21",
"@polkadot/util-crypto": "^1.2.0-beta.6"
"@polkadot/util-crypto": "^1.2.0-beta.7"
},
"devDependencies": {
"@polkadot/keyring": "^1.2.0-beta.6"
"@polkadot/keyring": "^1.2.0-beta.7"
}
}
@@ -1,4 +1,3 @@
/* eslint-disable no-dupe-class-members */
// Copyright 2017-2019 @polkadot/api authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
@@ -36,26 +36,24 @@ describeE2E({
});
// https://github.com/polkadot-js/api/issues/846
it('handles toJSON with no issues', async (done): Promise<() => void> => {
return (
api.rpc.chain.getBlock('0x85c62b581f38cb81c3e443d34392672beb1fb877017fd7237cc87704113259dc', (result: SignedBlock): void => {
const failed: Extrinsic[] = result.block.extrinsics.filter((extrinsic: Extrinsic): boolean => {
try {
const json = extrinsic.method.toJSON();
it('handles toJSON with no issues', (done): Promise<() => void> => {
return api.rpc.chain.getBlock('0x85c62b581f38cb81c3e443d34392672beb1fb877017fd7237cc87704113259dc', (result: SignedBlock): void => {
const failed: Extrinsic[] = result.block.extrinsics.filter((extrinsic: Extrinsic): boolean => {
try {
const json = extrinsic.method.toJSON();
console.error(json);
console.error(json);
return false;
} catch (error) {
console.log(extrinsic.method);
console.log(extrinsic.method.keys());
console.error(error);
return true;
}
});
expect(failed).toBeTruthy();
done();
})
);
return false;
} catch (error) {
console.log(extrinsic.method);
console.log(extrinsic.method.keys());
console.error(error);
return true;
}
});
expect(failed).toBeTruthy();
done();
});
});
});
+2 -2
View File
@@ -30,7 +30,7 @@
"@polkadot/jsonrpc": "^0.91.0-beta.21",
"@polkadot/rpc-provider": "^0.91.0-beta.21",
"@polkadot/types": "^0.91.0-beta.21",
"@polkadot/util": "^1.2.0-beta.6",
"rxjs": "^6.5.2"
"@polkadot/util": "^1.2.0-beta.7",
"rxjs": "^6.5.3"
}
}
+4 -4
View File
@@ -28,16 +28,16 @@
"dependencies": {
"@babel/runtime": "^7.5.5",
"@polkadot/api-metadata": "^0.91.0-beta.21",
"@polkadot/util": "^1.2.0-beta.6",
"@polkadot/util-crypto": "^1.2.0-beta.6",
"@polkadot/util": "^1.2.0-beta.7",
"@polkadot/util-crypto": "^1.2.0-beta.7",
"@types/nock": "^10.0.3",
"eventemitter3": "^4.0.0",
"isomorphic-fetch": "^2.2.1",
"websocket": "^1.0.29"
},
"devDependencies": {
"@polkadot/keyring": "^1.2.0-beta.6",
"@polkadot/keyring": "^1.2.0-beta.7",
"mock-socket": "^9.0.0",
"nock": "^10.0.4"
"nock": "^11.3.1"
}
}
+3 -3
View File
@@ -27,12 +27,12 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
"dependencies": {
"@babel/runtime": "^7.5.5",
"@polkadot/util": "^1.2.0-beta.6",
"@polkadot/util-crypto": "^1.2.0-beta.6",
"@polkadot/util": "^1.2.0-beta.7",
"@polkadot/util-crypto": "^1.2.0-beta.7",
"@types/memoizee": "^0.4.2",
"memoizee": "^0.4.14"
},
"devDependencies": {
"@polkadot/keyring": "^1.2.0-beta.6"
"@polkadot/keyring": "^1.2.0-beta.7"
}
}