wallet-http: provide info if key was added/removed to db
This commit is contained in:
parent
37a1d02e76
commit
5f47b23736
@ -574,9 +574,12 @@ class HTTP extends Server {
|
|||||||
|
|
||||||
const key = HDPublicKey.fromBase58(b58, this.network);
|
const key = HDPublicKey.fromBase58(b58, this.network);
|
||||||
|
|
||||||
await req.wallet.addSharedKey(acct, key);
|
const added = await req.wallet.addSharedKey(acct, key);
|
||||||
|
|
||||||
res.json(200, { success: true });
|
res.json(200, {
|
||||||
|
success: true,
|
||||||
|
addedKey: added
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Remove key
|
// Remove key
|
||||||
@ -589,9 +592,12 @@ class HTTP extends Server {
|
|||||||
|
|
||||||
const key = HDPublicKey.fromBase58(b58, this.network);
|
const key = HDPublicKey.fromBase58(b58, this.network);
|
||||||
|
|
||||||
await req.wallet.removeSharedKey(acct, key);
|
const removed = await req.wallet.removeSharedKey(acct, key);
|
||||||
|
|
||||||
res.json(200, { success: true });
|
res.json(200, {
|
||||||
|
success: true,
|
||||||
|
removedKey: removed
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Get key by address
|
// Get key by address
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user