epam / corgis

Simple solution for corgi NFT
https://epam.github.io/corgis
0 stars 4 forks source link

Send Corgi to another NEAR account #126

Closed zahhar closed 3 years ago

zahhar commented 3 years ago

Rules:

  1. Only Corgi owner can send (gift) Corgi he/she owns to another NEAR account
  2. As of now Corgi can be transfered only to the already existing account (no "Transfer and open account later" possible, this is enchancement idea)
  3. Corgi can be transferred only to the account on the same network (this is obvious ;)
  4. Owner spends only gas for transferring Corgi

FE:

  1. [x] Corgi can be transferred only from Corgi detail page that is accessed from "My Corgis" page
  2. [x] There is a "Gift" action button that (tbd) - either opens a popup, or shows text input with confirm button
  3. [x] User enters full recipient name (e.g. username.testnet or testuser.near) and clicks submit button
  4. [ ] If user does not exist - an error message is displayed, otherwise corgie gets transferred (tbd - confirmation required?)
  5. [x] Page is refreshed and user does not see his Corgi in the inventory

Smartcontract:

  1. [x] Check that only owner can call the method
  2. [x] Name the method according to the specs
  3. [x] Check receiver is an existent account on the network (see https://github.com/epam/corgis/issues/126#issuecomment-783349685)
acuarica commented 3 years ago

The near-sdk-rs does not provide a method to check if a given AccountId is an existent account on the network.