aboutsummaryrefslogtreecommitdiff
path: root/src/crypto
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-29 18:27:50 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-29 18:27:50 +0200
commit94d111a94533c0c31231642e8ffe4fbd4ce30096 (patch)
tree79c9f8ec3754699f8a135630f1ab6ee9be8019e6 /src/crypto
parentb5c90d12219ca3a0df173ddf085d2353831a8ef6 (diff)
downloadwallet-core-94d111a94533c0c31231642e8ffe4fbd4ce30096.tar.xz
lint for unused variables, fix query bug detected by this
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/cryptoApi-test.ts1
-rw-r--r--src/crypto/cryptoApi.ts4
-rw-r--r--src/crypto/emscInterface-test.ts4
-rw-r--r--src/crypto/emscInterface.ts3
4 files changed, 7 insertions, 5 deletions
diff --git a/src/crypto/cryptoApi-test.ts b/src/crypto/cryptoApi-test.ts
index 60bd44c90..7e391cd91 100644
--- a/src/crypto/cryptoApi-test.ts
+++ b/src/crypto/cryptoApi-test.ts
@@ -94,6 +94,7 @@ test("precoin creation", async (t) => {
};
const precoin = await crypto.createPreCoin(denomValid1, r);
+ t.truthy(precoin);
t.pass();
});
diff --git a/src/crypto/cryptoApi.ts b/src/crypto/cryptoApi.ts
index b5d7d4fb9..c3c1f508a 100644
--- a/src/crypto/cryptoApi.ts
+++ b/src/crypto/cryptoApi.ts
@@ -100,7 +100,7 @@ export class CryptoApi {
/**
* Start a worker (if not started) and set as busy.
*/
- wake<T>(ws: WorkerState, work: WorkItem): void {
+ wake(ws: WorkerState, work: WorkItem): void {
if (ws.currentWorkItem !== null) {
throw Error("assertion failed");
}
@@ -238,7 +238,7 @@ export class CryptoApi {
continue;
}
- this.wake<T>(ws, workItem);
+ this.wake(ws, workItem);
return;
}
diff --git a/src/crypto/emscInterface-test.ts b/src/crypto/emscInterface-test.ts
index 789ac2509..518ed8e72 100644
--- a/src/crypto/emscInterface-test.ts
+++ b/src/crypto/emscInterface-test.ts
@@ -114,6 +114,8 @@ test("withdraw-request", (t) => {
test("ecdsa", (t) => {
const priv = native.EcdsaPrivateKey.create();
const pub1 = priv.getPublicKey();
+ t.truthy(priv);
+ t.truthy(pub1);
t.pass();
});
@@ -121,5 +123,7 @@ test("ecdsa", (t) => {
test("ecdhe", (t) => {
const priv = native.EcdhePrivateKey.create();
const pub = priv.getPublicKey();
+ t.truthy(priv);
+ t.truthy(pub);
t.pass();
});
diff --git a/src/crypto/emscInterface.ts b/src/crypto/emscInterface.ts
index 81c6e9a21..8c9a34132 100644
--- a/src/crypto/emscInterface.ts
+++ b/src/crypto/emscInterface.ts
@@ -40,9 +40,6 @@ const emscLib = getLib();
const PTR_SIZE = 4;
const GNUNET_OK = 1;
-const GNUNET_YES = 1;
-const GNUNET_NO = 0;
-const GNUNET_SYSERR = -1;
/**