-
Notifications
You must be signed in to change notification settings - Fork 78
[Task] Check that recipient is valid before sending transaction #581
Description
Background
It would be nice to add a check that recipient is valid before sending transaction. It could be done in two ways:
- Making an rpc call to check that recipient exists on-chain and ask something like "The provided recipient
<account-id>does not exist on<network>, are you sure that you want to proceed? (y/n)"
This option can be more robust, but it'll make life a bit harder for those who want to send tokens to new account that wasn't activated yet
- By raw parent account check and making sure that "testnet" is not parent if mainnet network is selected and vice versa for testnet network
I think one this is simpler and doesn't require extra rpc call
User Story
As a user I want to have minimal chances of submitting a transaction to a recipient on different network or non-existent recipient at all, but I still want to be able to do it after explicit confirmation, I shouldn't be blocked by this
Acceptance Criteria
I think this can be added only for tokens subcommand for now, since contract should be safe (call will immediately fail if recipient is invalid)
Resources & Additional Notes
This is needed to prevent such issues https://nearblocks.io/txns/4SeBJbjHxkEmtbwB1T7FLxBHzkgGCg3HmqCcbQoatL2Q
Metadata
Metadata
Assignees
Labels
Type
Projects
Status