cityofzion / neolink Goto Github PK
View Code? Open in Web Editor NEWThis project forked from splyse/neolink
A Chrome Extension Wallet for the Neo Smart Economy
License: MIT License
This project forked from splyse/neolink
A Chrome Extension Wallet for the Neo Smart Economy
License: MIT License
There is a variable which takes the popWindow function, but doesn't seem to get used.
cd70c7a#diff-2a1604f1b1909cbd4aaae982c673b9cdR34
We should investigate if this needs to be corrected, and if not, we should re-work it so that the method gets invoked when we want it.
This was originally done here:
https://github.com/CityOfZion/NeoLink/blob/master/src/js/background.js#L344
Using a custom fork of neon-js:
uvmetal/neon-js@18c1ec4
We want to reimplement this in the React version of the app in the development branch. We want to continue using the CityOfZion neon-js branch so research needs to be done into whether it's currently possible to do this in neon-js v2 or if we can work with them to add it.
Asset Drop (gas or neo) doesn't hold state nor update properly.
Should be done in development branch in React.
Use jest and check out how neon-wallet does it. Write at least some initial tests.
Review and standardize error checking.
Review all debug logging to verify the proper data is being logged for all outcomes. The error checking may be the main culprit here but a separate issue is nice for tracking.
We should probably implement debug flag mechanism as well.
On dev branch the transaction order isn't always consistent on the home screen.
By accessing the extension directly, we have much better support for dev tooling.
chrome-extension://[CHROME_EXTENSION_ID]/popup.html
We should add redux dev tools for development to enable better inspection of the store at runtime.
Currently the page doesn't get an update, when the user does login or logout of NeoLink. Therefor he can't notify the user. Please send the same on login/logout message as on page load to the user, so the page knows about the status of NeoLink without constantly polling it.
This is partially implemented in the development branch in React.
Here's the original code:
https://github.com/CityOfZion/NeoLink/blob/master/src/js/content.js#L71
https://github.com/CityOfZion/NeoLink/blob/master/src/js/background.js#L116
We need that in the React version. Note that there is a separate issue to make Send Invoke actually work #13.
Popup in React version happens here:
https://github.com/CityOfZion/NeoLink/blob/development/src/js/background/popupWindow.js#L31
My thought is to create a new 'popupMessage.html' and pass the parameters as GET params. Then react can have a route for 'popupMessage.html' and show relevant panes based on the params.
Use CircleCI. Check out how neon-wallet does it. We should also have prepush checks on linting and tests (if testing is implemented when this is done)
If a Gas icon has been approved, let's keep a reminder to use that on transaction card et al.
Ability to import a WIF should be option for user.
We should add a script which runs our tests and lint code as a pre-commit hook.
To be implemented in the development branch in React.
Add these to the development branch.
We should use NEP-6:
neo-project/proposals#13
I think we can likely build this on top of what neon-js provides:
https://github.com/CityOfZion/neon-js/blob/master/src/wallet/Wallet.js
https://github.com/CityOfZion/neon-js/blob/master/src/wallet/Account.js
That has export/import json methods. We can store/retrieve in/from local storage.
To be done in React in the development branch
This may not be an issue right now, but I'd like to take note of it and open discussion.
Currently, the network selection is done by custom, "TestNet" or "MainNet" as per the usual community behavior. Internally to Neolink, this means for queries that it uses Neoscan REST to determine endpoints by API and for actions it uses neon-js api.neoscan to acquire RPC nodes for transactions.
I'm pondering how this could be or become an issue, say in the case where one is down and another is up. This is as much as a reminder as a forum.
Robust error detection in the network selection code with good user feedback may be all that is needed.
Look at how dApps are passing messages to NeoLink for sc execution now and see if it is the best way or if we need another approach.
Create a "Next Page" feature for the home screen transaction list.
I was doing some testing of neolink on testnet and just realized that when it picks a bad node unusual things can happen.
We should have a way for the user to easily see a node and try another one that is equally or lesser ranked.
Development branch:
The Transaction failure status page on the send card could use some polish.
Can the content.js (dApp side) pop open the authorization tab in NeoLink to prompt the user to authorize a transaction? If not, should we use a modal message that prompts the user to login / authorize in NeoLink
Since it's on the roadmap and a new UI is being built, we should get linting running before going too deep. I have a set of react lint rules I'm using for cityofzion.io that will work here as well.
Add to settings a way for the user to choose type of API to use for all queries:
testinvoke
and getstorage
cost 0 GAS and doesn't write to sc storage, so web pages should be able to call it using the logged in NeoLink address without an authorization dialogue. Web pages could then parse the returned data directly.
Add a feature to allow a site to get the address of the connected wallet. Work out what kind of controls we should have around this
On the Home screen, Neo amounts on transaction cards appear right justified, Gas appears left.
os :widnows 10
nodejs:8.9.2
npm:5.5.1
PS D:\lab_git\NeoLink> npm run build
[email protected] build D:\lab_git\NeoLink
NODE_ENV=production node utils/build.js
'NODE_ENV' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: NODE_ENV=production node utils/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\TerryLiu\AppData\Roaming\npm-cache_logs\2018-02-28T06_05_56_735Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]prebuild: [email protected]build: [email protected]
6 info lifecycle [email protected]
7 verbose lifecycle [email protected]build: unsafe-perm in lifecycle truebuild: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\lab_git\NeoLink\node_modules.bin;C:\Program Files\Docker\Docker\Resources\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\OpenVPN\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files\dotnet;C:\Program Files (x86)\OpenSSH\bin;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\Java\jdk1.8.0_131\jre\bin;C:\Program Files\nodejs;C:\Program Files (x86)\Yarn\bin;C:\Program Files\Git\cmd;C:\Users\TerryLiu.app;C:\Users\TerryLiu\AppData\Local\Microsoft\WindowsApps;D:\我的坚果云\代码库\neo-compiler\neon\bin\Release\netcoreapp1.0\win10-x64;C:\Users\TerryLiu\AppData\Roaming\npm;C:\Program Files\Microsoft VS Code\bin;C:\Users\TerryLiu\AppData\Local\Yarn\bin
8 verbose lifecycle [email protected]
9 verbose lifecycle [email protected]build: CWD: D:\lab_git\NeoLinkbuild: Args: [ '/d /s /c', 'NODE_ENV=production node utils/build.js' ]
10 silly lifecycle [email protected]
11 silly lifecycle [email protected]build: Returned: code: 1 signal: nullbuild: Failed to exec build script
12 info lifecycle [email protected]
13 verbose stack Error: [email protected] build: NODE_ENV=production node utils/build.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd D:\lab_git\NeoLink
16 verbose Windows_NT 10.0.14393
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build"
18 verbose node v8.9.2
19 verbose npm v5.5.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build: NODE_ENV=production node utils/build.js
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I'd like to suggest a number of changes to the components. Please let me know if you have any thoughts on these suggestions.
Currently, the Account Info Amounts have a refresh button, but the Transaction list does not and it does not refresh automatically. One has to go to another card then come back to refresh transactions.
I propose a UI enhancement to create a refresh button in the Transaction list section.
In order to test wallet, tried to access CTX from wallet, but there is no option to load token into the wallet so it doesn't show in my wallet. Can user be allowed to add the token type to the wallet? Easier than having to do it on dev side for each one?
Sent Funds doesn’t fit into one screen without scrolling … looks like it is just cutting off midway and no scrollbar present or no way to change size of wallet screen - consider decrease in spacing to allow it to completely fit - future check to see if impacted by system font sizes
Change neon-js to https://github.com/CityOfZion/neon-js .. we need collaboration and more eyes on that, as neon-js will probably become the web3 of NEO.
When you're not signed in and land on the login page, you have the option to select Use saved wallet
, but this option redirects to the page you're already on.
An address book would be useful. Store recents/history and any you'd like to save with mnemonic aliases. Have an option to list balances in summary view.
Did not clear the previous button highlight when I went back to screen after sending initial amount (Steps: #Opted to send gas; filled out required fields; hit send; saw message; checked the transaction info on neoscan-testnet.io; reopened neolink from chrome icon)
I'd feel a bit safer if it did, and especially more safe if I could properly back up my private keys and wallets.
Ability to add a privnet with neoscan in front + do balance/transaction queries to it.
Add a pin option to the flyout for the account label on the home screen.
Rationale:
If you are reviewing a deep list of txs, you don't have to go all the way back up if you want to perform an account action. You also get modular screen real estate.
The material design components expose their own css in components which breaks proper CSS Module isolation, and causes issues with component tests. We should isolate the material components behind our own API to prevent CSS Module conflicts and make it easy to update our code if we want to remove the material components later.
Currently, dApps can only require sc invoke with 2 arguments. This should be variadic.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.