wallet-selector icon indicating copy to clipboard operation
wallet-selector copied to clipboard

Fastauth metamask

Open mattlockyer opened this issue 1 year ago • 4 comments

To start:

  • yarn && yarn build:fastauth-metamask && yarn serve:react
  • login and select MetaMask
  • follow prompts

Basic implementation of:

  • search mapping contract for existence of NEAR account for Ethereum Address
  • sign message with MetaMask to generate keyPair for new Account
  • new KeyPair stored in memory
  • signIn with wallet-selector
  • signOut with wallet-selector
  • verifyOwner
  • signAndSendTransaction(s)

TODO

  1. deploy mapping contract and verify if NEAR account exists for given Ethereum address
  2. create account (with MetaTransaction API) if no mapping found and add the Ethereum account and NEAR account to the mapping contract
  3. fix signIn flow so modal hides without error

mattlockyer avatar Apr 10 '23 19:04 mattlockyer

Hi @mattlockyer,

I'm having this issue to build it as it's shown in the repo. Also tried to fix these issues, but I'm assuming that this isn't finished. Some functions don't work, there is missing import and type, and some variables are not renamed from neth. Feel free to comment if I'm missing something.

image

HarisSQA avatar Apr 20 '23 12:04 HarisSQA

Sorry for the build errors, yarn serve:react was working previously and I guess the dev server was less strict.

mattlockyer avatar Apr 21 '23 02:04 mattlockyer

@mattlockyer I added this PR to help you fix the linting issues: https://github.com/NearDeFi/wallet-selector/pull/1, if this looks good you can go ahead and merge it and then address other outstanding comments in this PR.

To spot these linting issues you might need to configure your IDE and then most of them would "automatically" be fixed on save.

https://github.com/near/wallet-selector#editor-setup

kujtimprenkuSQA avatar Apr 24 '23 14:04 kujtimprenkuSQA

Thanks for the help. Ideally someone from Pagoda who understands more about how they plan to use the keys generated by MetaMask takes the lead on this PR. I'm still in the dark as to how accounts will be created and where keys will be stored once those accounts are created.

Appreciate the PR @kujtimprenkuSQA

mattlockyer avatar May 04 '23 03:05 mattlockyer