-
Notifications
You must be signed in to change notification settings - Fork 19
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
Integrate wallet providers #65
Conversation
You are more than welcome, @collari. We can give you permission to direct edit here as well if you want. I will test the PR and install NeoLine here as well. |
Thanks for the integration, @corollari, I do not know why but our github does not show the button to upon with master. Thus, there are some duplicated things from the previous commit. I left some minor comments, let's finish this integration, it will be nice! |
The last commit addresses the changes you requested (clean the code, re-organize it into functions to reduce duplication and change the network selection UI) and extend the integration to O3 and NeoLogin. Full disclosure: I'm the lead dev of NeoLogin |
Pushed an update that shows the wallets only if they are available (user has them installed). Before they always showed up but if a user tried to select them but they didn't have them installed an error would pop up. If in your opinion it was better before I can just revert it. |
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.
Great job, @corollari.
I still need to test. I am just checking the code for now.
I believe it might be almost ready.
@corollari, I do not know why, but here in our repo I do not see how to update your PR based on master. Do you know how to fix that? |
"ERROR (DEPLOY): Only MainNet and TestNet are supported by wallet providers." I tried on testnet but it says: @corollari, it would be nice if the wallet of NEOLOGIN was added to the http://localhost:8000/#!/ecolab/wallet tab. Thus, the user can easily the balance it has. |
During deploy: Uncaught (in promise) ReferenceError: idToDeploy is not defined
at handleDeploy (invoke_deploy_NeonJS.js:297)
at invoke_deploy_NeonJS.js:284" |
No idea how to fix the thing with github but I just rebased the PR on master, that should have the same effect. |
Perfect, I had mad a PR on your repo for such update. But the rebase may had solved that. |
public/partials/ecolab.html
Outdated
@@ -3052,4 +3083,6 @@ <h4>ABI:</h4> | |||
sendingTxPromiseWithEcoRaw(PendingTX,PendingTXParams); | |||
} | |||
</script> | |||
<script src="https://cdn.jsdelivr.net/npm/neo-dapi@1.0.2/lib/neo-dapi.min.js"></script> |
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.
before merging we should download these .js and load from the file.
We are doing that with all packages of neocompiler in order to avoid dependencies with external providers.
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.
Done! I've also added instructions on how to download these packages (especially important in the case of O3 because versions of the js package which are newer than 1.0.2 do not work) to public/js/README.md
It seems github automatically marked your PR as merged |
Working on solving the problems that you raised on deploy() currently |
Just fixed the following error:
|
Will start working on adding addresses & balances to the wallet tab |
Just fixed the bug that caused the following error you reported:
|
Just pushed one last commit that makes the wallet provider's address appear in all the places where the set of pre-defined addresses of ECO_WALLET usually appear, including the /wallet tab. Thoughts? |
@corollari, Alllbert, do you have O3 installed and running, right? Take a look at this api: https://neodapitestbed.o3.app/index.html For the neocompiler-eco we would need to update the |
@corollari, can you give me access to your branch? |
@corollari, I changed the provider from "None" to "NeoCompiler-Eco". We still need to update the other parts that use the flag "None" |
@vncoelho When I created the PR I ticked the checkbox to give you access to the branch but maybe there's smth wrong, do you want me to port these commits into a branch of the neoresearch repo? |
In fact, it is strange, I was able to commit, but not to merge the PR corollari#2. I think it is ok, @corollari. I will work on the PR locally and try to push. |
This should work. |
Is there anything missing on my end? I'm not trying to put pressure but just to make sure that I haven't forgotten something due to the conversation being split between discord and github. |
Noo, @corollari, you are doing great. But we focused on removing all node requirements from the project. Now, everything is dockerized! This helped a lot. |
} | ||
if($("#ecolabproviderselection").val() === "NeoCompiler-Eco"){ | ||
changeAccount(window.storedECO_WALLET); | ||
} else { |
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.
It looks like this is not working. I do not know why but the EcoWallet is being kept as the original.
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.
It was not working on Brave Browser!
On firefox it worked.
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.
It is strange, @corollari, because https://neologin.io/testbed/#collapse-getProvider works on Brave.
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.
That's really strange because I did all my development on Chromium.. did you manage to find the root cause?
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.
neologin-1.2.4.js:8 Uncaught (in promise) Error: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
at main.17a8c4b5.chunk.js:1
at new Promise (<anonymous>)
at X (main.17a8c4b5.chunk.js:1)
at Object.keys.map._.<computed> [as getAccount] (main.17a8c4b5.chunk.js:1)
at 2.6d2d096a.chunk.js:1
at new Promise (<anonymous>)
at l (2.6d2d096a.chunk.js:1)
I think that the error is this one.
It keep Pending on GetAccount...I do not know. Strange.But on firefox it is ok.
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.
I was able to test everything now, @corollari!!!
I think that we are almost there.
Pending things are:
- Track the changes on EcoWallet on every step, thus, we do not lose them when we move to Provider and come back;
- Enable transfers. Otherwise we can not claim GAS from the NeoCompiler-Eco Front-end.
- Remove the
checkProviderNetwork
check, why we can not operate on PrivateNet or SharedPrivateNet? We just need NeoLogin capabilities for signing the txs, right?
I will also try to help on them tomorrow, perhaps I can tackle 1.
Mergin Master
On it! |
@corollari, great job, once more! |
@corollari , thanks for everything. I did not double check, quite busy here with Wang Yong Qiang and some talks on some Universities here..ahauah Great time! |
Integrates NEOLine, enabling the use of the account stored in the extension to deploy and invoke smart contracts.
Currently deploying is not working due to what I believe to be issues with NEOLine itself, I've notified upstream and once issues are fixed there this PR should work fine.
Posting it here so that if other people try to implement it they will see this and won't have to redo the work I've done.
If you believe this should only be posted once it's ready to be merged feel free to close it directly.