From 915612114ba88fe6b5338c920dc3506001630052 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 6 May 2015 17:04:50 -0700 Subject: [PATCH] Remove general get/put/remove methods from AxolotlStore --- js/axolotl_store.js | 9 --------- test/storage_test.js | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/js/axolotl_store.js b/js/axolotl_store.js index 3ac72e95..be3fb3bb 100644 --- a/js/axolotl_store.js +++ b/js/axolotl_store.js @@ -87,15 +87,6 @@ AxolotlStore.prototype = { constructor: AxolotlStore, - get: function(key,defaultValue) { - return textsecure.storage.get(key, defaultValue); - }, - put: function(key, value) { - textsecure.storage.put(key, value); - }, - remove: function(key) { - textsecure.storage.remove(key); - }, getMyIdentityKey: function() { var res = textsecure.storage.get('identityKey'); if (res === undefined) diff --git a/test/storage_test.js b/test/storage_test.js index 739e3fd6..01f893b4 100644 --- a/test/storage_test.js +++ b/test/storage_test.js @@ -29,12 +29,12 @@ describe("AxolotlStore", function() { privKey: textsecure.crypto.getRandomBytes(32), }; it('retrieves my registration id', function() { - store.put('registrationId', 1337); + textsecure.storage.put('registrationId', 1337); var reg = store.getMyRegistrationId(); assert.strictEqual(reg, 1337); }); it('retrieves my identity key', function() { - store.put('identityKey', identityKey); + textsecure.storage.put('identityKey', identityKey); var key = store.getMyIdentityKey(); assertEqualArrayBuffers(key.pubKey, identityKey.pubKey); assertEqualArrayBuffers(key.privKey, identityKey.privKey);