Let removeIdentityKey delete the entire record

Previously we would only clear the publicKey since that was the only attribute,
but now we should delete the entire record. This method is currently only called
from tests.

// FREEBIE
This commit is contained in:
lilia 2017-06-13 13:40:09 -07:00 committed by Scott Nonnenberg
parent d1858de39b
commit 12d9bb61c3

View file

@ -562,7 +562,7 @@
return new Promise(function(resolve, reject) {
var identityKey = new IdentityKey({id: number});
identityKey.fetch().then(function() {
identityKey.save({publicKey: undefined});
identityKey.destroy();
}).fail(function() {
reject(new Error("Tried to remove identity for unknown number"));
});