near / near-cli

General purpose command line tools for interacting with NEAR Protocol
https://docs.near.org
MIT License
193 stars 93 forks source link

refactor: check if beneficiary account exists, require confirmation #999

Closed judith-Near closed 2 years ago

judith-Near commented 2 years ago

related to issue https://github.com/near/near-cli/issues/994

PR adds a warning This method will delete your account. Beneficiary account must exist in order to transfer all Near tokens. Make sure to send all fungible tokens or NFTs that you own to the beneficiary account prior to deleting, as this method will only transfer NEAR tokens. Do you want to proceed? that the user must confirm.

Delete will also not run if beneficiary account does not exist.

volovyks commented 2 years ago

@judith-Near @BenKurrek looks like this PR broke tests.

BenKurrek commented 2 years ago

@volovyk-s oop yea it looks like the tests have to be rewritten?