-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fastauth metamask #773
base: dev
Are you sure you want to change the base?
Fastauth metamask #773
Conversation
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. |
Sorry for the build errors, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build passes locally but there are a few linting issues which prevent the gh-actions to pass, try running:
yarn nx run fastauth-metamask:lint
When I tried to sign in with MetaMask on the final step the account id is not showing properly on the alert popup, can you fix this:
UPDATE: The [object Object] was showing because I had a near account in MetaMask via NETH after removing and installing meta mask again this popup is not showing but it still says "kujtimprenku.testnet" has not been founded but I have NEAR on this account.
// chainId: 1, // aurora | ||
chainId: 1313161554, // aurora | ||
}; | ||
const MODAL_ELEMENT_ID = "near-wallet-selector-modal"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ID conflicts with the main modal https://github.com/near/wallet-selector/blob/main/packages/modal-ui/src/lib/modal.tsx#L12 how is this meant to be used?
Looks like this is the reason why the flow throws an error when signIn finishes and the modal hides.
@mattlockyer I added this PR to help you fix the linting issues: NearDeFi#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. |
|
||
let res; | ||
try { | ||
res = await (account as any).signAndSendTransactions({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the signAndSendTransactions
exist in the Account
class?
https://github.com/near/near-api-js/blob/master/packages/accounts/src/account.ts
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 |
To start:
Basic implementation of:
TODO