Allow proper promise failure (#316)

* Allow proper promise failure

* Remove unneeded dep
This commit is contained in:
Jaco Greeff
2019-02-16 11:05:53 +01:00
committed by GitHub
parent b9a58f84b9
commit bc2b1344b7
4 changed files with 3 additions and 10 deletions
-1
View File
@@ -29,7 +29,6 @@
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/util-crypto#readme",
"dependencies": {
"@babel/runtime": "^7.3.1",
"@parity/schnorrkel-js": "^0.1.2",
"@polkadot/util": "^0.34.16",
"@types/bip39": "^2.4.2",
"@types/webassembly-js-api": "^0.0.2",
@@ -258,7 +258,6 @@ const createPromise = require('./schnorrkel_js_bg');
const wasmPromise = createPromise(wasmImports);
module.exports.isReady = function () { return !!wasm; }
module.exports.waitReady = function () { return wasmPromise.then(() => true); }
wasmPromise.then((_wasm) => { wasm = _wasm });
module.exports.waitReady = function () { return wasmPromise.then(() => !!wasm); }
wasmPromise.then((_wasm) => { wasm = _wasm }).catch(() => {});
@@ -1,7 +1,7 @@
const bytes = require('./schnorrkel_js_wasm');
module.exports = function createExportPromise (wasmImports) {
module.exports = async function createExportPromise (wasmImports) {
const imports = {
'./schnorrkel_js': wasmImports
};
-5
View File
@@ -1370,11 +1370,6 @@
universal-user-agent "^2.0.0"
url-template "^2.0.8"
"@parity/schnorrkel-js@^0.1.2":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@parity/schnorrkel-js/-/schnorrkel-js-0.1.2.tgz#08c9663299cbe43d292599a1312a761b2426900f"
integrity sha512-eQSCY6kb16Lhnlgdz1FbADo1PEI3Xgp0ApGpNydf0yBEQ6AMVo1YN/4zMA3lFjqnurv9NsAy11OJApailUNneQ==
"@polkadot/dev@^0.24.2":
version "0.24.2"
resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.24.2.tgz#3cde72bff3f005c6d268b59bf72163f1670c7cfe"