Accept and decline ownership offers

This commit is contained in:
yflory
2019-08-30 17:36:27 +02:00
parent c76363e765
commit e131661673
7 changed files with 142 additions and 37 deletions

3
rpc.js
View File

@@ -367,7 +367,8 @@ var setMetadata = function (Env, data, unsafeKey, cb) {
metadata.owners.indexOf(unsafeKey) === -1) {
// If you are a pending owner, make sure you can only add yourelf as an owner
if (command !== 'ADD_OWNERS' || !Array.isArray(data.value)
if ((command !== 'ADD_OWNERS' && command !== 'RM_PENDING_OWNERS')
|| !Array.isArray(data.value)
|| data.value.length !== 1
|| data.value[0] !== unsafeKey) {
g();