Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

add delete-key command to delete access key #383

Merged
merged 3 commits into from
May 22, 2020

Conversation

mikedotexe
Copy link
Contributor

@mikedotexe mikedotexe commented May 21, 2020

Delete's an access key.
Pull down branch and you can use this command
Command:
./bin/near delete-key 2rLDDvyk8wdpq4TZ3k2xmCxhykq431eNKQ7Mfg31nT4q --accountId mike.testnet

The access key can be copied from Wallet. Tested on full access and authorized apps keys.

@mikedotexe mikedotexe linked an issue May 21, 2020 that may be closed by this pull request
@bowenwang1996
Copy link
Contributor

@mikedotexe why is this flag --accessKey needed?

@mikedotexe
Copy link
Contributor Author

@bowenwang1996 going to wait for tests to pass for posterity but then I'll merge and check with Vlad about cutting a release. If I don't hear back from him I'll cut one

@mikedotexe
Copy link
Contributor Author

mikedotexe commented May 21, 2020

@mikedotexe why is this flag --accessKey needed?

you mean as opposed to just
near delete-key mYHaSH… --accountId mike.testnet?

UPDATE: good point, Bowen. pushed fix so it's like that.

index.js Outdated
@@ -199,6 +199,16 @@ exports.sendMoney = async function (options) {
await eventtracking.track(eventtracking.EVENT_ID_SEND_TOKENS_END, { node: options.nodeUrl, success: true });
};

exports.deleteAccessKey = async function (options) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'd prefer we add new commands as separate self-contained files (i.e. in commands/ folder). We should extract existing commands too eventually.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, pushed up that change, Vlad

@vgrichina vgrichina merged commit 46d3f14 into master May 22, 2020
@mikedotexe mikedotexe deleted the hotfix/353-delete-access-key branch May 22, 2020 17:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't delete access keys
4 participants