ln-zap / zap-desktop Goto Github PK
View Code? Open in Web Editor NEWZap Wallet - Cross platform Lightning Network wallet focused on user experience and ease of use ⚡️
License: MIT License
Zap Wallet - Cross platform Lightning Network wallet focused on user experience and ease of use ⚡️
License: MIT License
@JimmyMow We need to provide more details of the node selected/hovered in the channel graph provided to gain more insights on popular nodes.
The application support Litecoin and can/will support others as well but defaults to BTC colors for now. Curious what the best way is to accomplish dynamic color-way themes
Now that we subscribe to new transactions for both on-chain/LN and channel updates we should be updating the wallet/channel balance accordingly.
There is a fetchBalance
function in the balance
reducer already, it just needs to be called in the right places for async updates
Hi everyone,
I have a fully synced segwit BTCD node up with LND, and building this on Ubuntu 17.04. I used npm to install dependencies ( I know it said to use yarn, but I was having problems with installing yarn so I stuck with npm instead). Npm generated the following log after I ran npm run dev.
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle [email protected]~predev: [email protected]
6 info lifecycle [email protected]~dev: [email protected]
7 verbose lifecycle [email protected]~dev: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~dev: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/tempest/zap-desktop/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle [email protected]~dev: CWD: /home/tempest/zap-desktop
10 silly lifecycle [email protected]~dev: Args: [ '-c', 'cross-env START_HOT=1 npm run start-renderer-dev' ]
11 silly lifecycle [email protected]~dev: Returned: code: 1 signal: null
12 info lifecycle [email protected]~dev: Failed to exec dev script
13 verbose stack Error: [email protected] dev: `cross-env START_HOT=1 npm run start-renderer-dev`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:289:16)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at EventEmitter.emit (events.js:213:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at ChildProcess.emit (events.js:213:7)
13 verbose stack at maybeClose (internal/child_process.js:927:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/tempest/zap-desktop
16 verbose Linux 4.10.0-33-generic
17 verbose argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev"
18 verbose node v8.4.0
19 verbose npm v5.3.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] dev: `cross-env START_HOT=1 npm run start-renderer-dev`
22 error Exit status 1
23 error Failed at the [email protected] dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Admittedly I'm quite new to this, but any suggestions for next steps would be greatly appreciated.
Zap opens and closes channels async and waits for updates from LND to fetch the new channels list.
The issue here is that the UX is poor. The form closes and the user is left not knowing what's happening for 5-30 seconds while LND is attempting to open/close the channel
Zap should update some form of CHANNEL_IS_OPENING and CHANNEL_IS_CLOSING state inside the channel reducer. This way we can design some UI to show the user work is being done behind the scenes.
Design should be consulted with myself and @brandnanthny in slack
While LND is syncing and we are showing the spinner with a % number we can generate a new address and display it. I personally would like to deposit while I'm waiting for sync.
Talk to myself and @brandnanthny on slack for design
Right now all errors are simple logged to the console. We need to display errors that happen when trying to create a channel.
Work with @JimmyMow and @brandnanthny on the design
I have tried to follow the documentation for installing zap-desktop on a OSX 10.13.2. I'm using [email protected]
, [email protected]
installed by nvm
and yarn
installed by brew
@ version 1.3.2. When executing yarn
the dependency installation exits out with:
[0] !! No [email protected] libdefs found in flow-typed for the above untyped dependencies !!
[0]
[0] I've generated `any`-typed stubs for these packages, but consider submitting
[0] libdefs for them to https://github.com/flowtype/flow-typed/
[0]
[0] npm run flow-typed exited with code 0
Do you have any idea of what is going wrong?
LND Neutrino
light client should be packaged with the app and running in the background, the user should not be responsible for running LND
themselves unless they want to.
Already Done :) #117
The payments list should include on-chain + LN payments ordered by timestamp. Check with @brandnanthny and @jackmallers for design wireframes
When I ran npm run test
, it tells me I need to run a couple other things. npm run build-main
seemed to work fine, and npm run build-renderer
took a long time, but ended up working. But after that, when I run the tests, all of them pass except api\index.spec.js
:
C:\zap\zap-desktop>npm run test
> [email protected] test C:\zap\zap-desktop
> cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 node --trace-warnings ./test/runTests.js
PASS test\reducers\form.spec.js
PASS test\reducers\info.spec.js
PASS test\reducers\balance.spec.js
PASS test\reducers\payment.spec.js
PASS test\reducers\channels.spec.js
PASS test\reducers\invoice.spec.js
PASS test\reducers\ticker.spec.js
PASS test\reducers\peers.spec.js
FAIL test\api\index.spec.js (10.795s)
? API > getinfo > is synced to the chain
TypeError: Cannot read property 'synced_to_chain' of undefined
at Object.<anonymous> (test/api/index.spec.js:7:23)
at Generator.next (<anonymous>)
at step (test/api/index.spec.js:1:323)
at test/api/index.spec.js:1:483
at process._tickCallback (internal/process/next_tick.js:109:7)
? API > getinfo > only supports 1 chain at a time
TypeError: Cannot read property 'chains' of undefined
at Object.<anonymous> (test/api/index.spec.js:12:23)
at Generator.next (<anonymous>)
at step (test/api/index.spec.js:1:323)
at test/api/index.spec.js:1:483
at process._tickCallback (internal/process/next_tick.js:109:7)
? API > balance > returns wallet balance
TypeError: Cannot read property 'balance' of undefined
at Object.<anonymous> (test/api/index.spec.js:19:41)
at Generator.next (<anonymous>)
at step (test/api/index.spec.js:1:323)
at test/api/index.spec.js:1:483
at process._tickCallback (internal/process/next_tick.js:109:7)
? API > balance > returns channel balance
TypeError: Cannot read property 'balance' of undefined
at Object.<anonymous> (test/api/index.spec.js:24:42)
at Generator.next (<anonymous>)
at step (test/api/index.spec.js:1:323)
at test/api/index.spec.js:1:483
at process._tickCallback (internal/process/next_tick.js:109:7)
? API > peers > peers is an array
TypeError: Cannot read property 'peers' of undefined
at Object.<anonymous> (test/api/index.spec.js:31:38)
at Generator.next (<anonymous>)
at step (test/api/index.spec.js:1:323)
at test/api/index.spec.js:1:483
at process._tickCallback (internal/process/next_tick.js:109:7)
? API > channels > channels is an array
TypeError: Cannot read property 'channels' of undefined
at Object.<anonymous> (test/api/index.spec.js:38:41)
at Generator.next (<anonymous>)
at step (test/api/index.spec.js:1:323)
at test/api/index.spec.js:1:483
at process._tickCallback (internal/process/next_tick.js:109:7)
? API > invoices > invoices is an array
TypeError: Cannot read property 'invoices' of undefined
at Object.<anonymous> (test/api/index.spec.js:45:41)
at Generator.next (<anonymous>)
at step (test/api/index.spec.js:1:323)
at test/api/index.spec.js:1:483
at process._tickCallback (internal/process/next_tick.js:109:7)
? API > payments > payments is an array
TypeError: Cannot read property 'payments' of undefined
at Object.<anonymous> (test/api/index.spec.js:52:41)
at Generator.next (<anonymous>)
at step (test/api/index.spec.js:1:323)
at test/api/index.spec.js:1:483
at process._tickCallback (internal/process/next_tick.js:109:7)
Test Suites: 1 failed, 8 passed, 9 total
Tests: 8 failed, 94 passed, 102 total
Snapshots: 51 passed, 51 total
Time: 12.811s
Ran all test suites matching "test\\(?!e2e\\)[^\\]+\\.+\.spec\.js$".
I'm on a windows 8.1 machine with node v7.10.0
I am interested in joining the discussion, can someone update the Slack link?
I'm getting the following error while trying to run npm run dev
while running lnd:
[0] error: { Error: unknown service lnrpc.Lightning
[0] at ClientReadableStream._emitStatusIfDone (/Users/zubin/open_source/zap-desktop/app/node_modules/grpc/src/client.js:255:19)
[0] at ClientReadableStream._receiveStatus (/Users/zubin/open_source/zap-desktop/app/node_modules/grpc/src/client.js:233:8)
[0] at /Users/zubin/open_source/zap-desktop/app/node_modules/grpc/src/client.js:705:12 code: 12, metadata: Metadata { _internal_repr: {} } }
[0] TRANSACTION STATUS: { code: 12,
[0] details: 'unknown service lnrpc.Lightning',
[0] metadata: Metadata { _internal_repr: {} } }
This might be more of a git issue than zap-desktop issue, but I don't really know where else to ask. When I enter the zap-desktop dir, I get the following message:
Warning: CRLF will be replaced by LF in resources/bin/linux/lnd.
The file will have its original line endings in your working directory.
It also becomes super slow to navigate around the repo, I assume this is because git is doing something wonky with the line endings for every command I issue.
Any ideas on what I should do about this?
EDIT: I'm running Linux Mint, by the way.
Getting "This invite link is no longer active." from the link in the readme
At resources/bin/darwin/lnd
.
Not good practice.
I wrote a websocket-friendly RPC/event protocol called RPEP, based on a module I implemented for a project based on websocket server-client communication. If you're interested in using the protocol, I could open source a javascript implementation that you could use in this project. Here's the spec: https://github.com/Tixit/RPEP .
[0] lnd error: Error: spawn /home/user/zap-desktop/resources/bin/linux/lnd ENOENT
[0] lnd shutting down -2
It's not that this should be in the repository, but it should be part of the build process right?
Subscribe to ChannelGraph graph topology updates on the backend (inside the app/lnd/subscribe
folder: https://github.com/LN-Zap/zap-desktop/tree/master/app/lnd/subscribe)
Currently the "Payment Request" UI does not have a max field length which allows you to crash the "Wallet" when using an overly long note. This behavior survives a reboot of zap wallet.
ZAP Error:
[0] invoices error: { Error: unable to decode payment request: invalid field length
[0] at /home/pnd/zap-desktop/app/node_modules/grpc/src/client.js:554:15 code: 2, metadata: Metadata { _internal_repr: {} } }
[0] invoices error: { Error: unable to decode payment request: invalid field length
[0] at /home/pnd/zap-desktop/app/node_modules/grpc/src/client.js:554:15 code: 2, metadata: Metadata { _internal_repr: {} } }
[0] context mismatch in svga_sampler_view_destroy
[0] invoices error: { Error: unable to decode payment request: invalid field length
[0] at /home/pnd/zap-desktop/app/node_modules/grpc/src/client.js:554:15 code: 2, metadata: Metadata { _internal_repr: {} } }
LND Invoice Log:
2017-12-24 11:14:13.737 [DBG] LTND: Adding invoice (*channeldb.Invoice)(0xc4200a9a20)({
Memo: ([]uint8) (len=268 cap=288) {
00000000 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 |abcdefghijklmnop|
00000010 71 72 73 74 75 76 77 78 79 7a 61 62 63 64 65 66 |qrstuvwxyzabcdef|
00000020 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 |ghijklmnopqrstuv|
00000030 77 78 79 7a 61 62 63 64 65 66 67 68 69 6a 6b 6c |wxyzabcdefghijkl|
00000040 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 61 62 |mnopqrstuvwxyzab|
00000050 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 |cdefghijklmnopqr|
00000060 73 74 75 76 77 78 79 7a 61 62 63 64 65 66 67 68 |stuvwxyzabcdefgh|
00000070 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 |ijklmnopqrstuvwx|
00000080 79 7a 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e |yzabcdefghijklmn|
00000090 6f 70 71 72 73 61 62 63 64 65 66 67 68 69 6a 6b |opqrsabcdefghijk|
000000a0 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 6b |lmnopqrstuvwxyzk|
000000b0 33 34 32 34 61 62 63 64 65 66 67 68 69 6a 6b 6c |3424abcdefghijkl|
000000c0 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 61 62 |mnopqrstuvwxyzab|
000000d0 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 |cdefghijklmnopqr|
000000e0 73 74 75 76 77 78 79 7a 32 33 33 74 75 76 77 78 |stuvwxyz233tuvwx|
000000f0 79 7a 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e |yzabcdefghijklmn|
00000100 6f 70 71 72 73 74 75 76 77 78 79 7a |opqrstuvwxyz|
},
Receipt: ([]uint8) <nil>,
PaymentRequest: ([]uint8) (len=623 cap=640) {
00000000 6c 6e 74 62 34 32 39 34 39 36 37 30 6e 31 70 64 |lntb42949670n1pd|
00000010 72 6c 6c 79 39 70 70 35 7a 6d 76 70 76 75 35 76 |rlly9pp5zmvpvu5v|
00000020 77 79 68 78 6a 6c 6c 64 6a 75 79 68 72 37 76 6a |wyhxjlldjuyhr7vj|
00000030 6c 35 68 39 76 7a 6d 37 67 77 6c 67 67 30 37 63 |l5h9vzm7gwlgg07c|
00000040 76 74 6a 38 65 38 67 78 73 6d 71 71 64 64 64 76 |vtj8e8gxsmqqdddv|
00000050 39 33 78 78 65 72 39 76 65 6e 6b 73 36 74 32 64 |93xxer9venks6t2d|
00000060 64 6b 78 36 6d 6e 30 77 70 63 68 79 75 6d 35 77 |dkx6mn0wpchyum5w|
00000070 34 6d 38 77 37 72 65 30 66 73 6b 79 63 6d 79 76 |4m8w7re0fskycmyv|
00000080 34 6e 78 77 36 72 66 64 66 34 6b 63 6d 74 77 64 |4nxw6rfdf4kcmtwd|
00000090 61 63 38 7a 75 6e 6e 77 33 36 68 76 61 6d 63 30 |ac8zunnw36hvamc0|
000000a0 39 61 78 7a 63 6e 72 76 33 6a 6b 76 65 6d 67 64 |9axzcnrv3jkvemgd|
000000b0 39 34 78 6b 6d 72 64 64 65 68 68 71 75 74 6a 77 |94xkmrddehhqutjw|
000000c0 64 36 38 32 61 6e 68 30 70 75 68 35 63 74 7a 76 |d682anh0puh5ctzv|
000000d0 64 6a 78 32 65 6e 38 64 70 35 6b 35 36 6d 76 64 |djx2en8dp5k56mvd|
000000e0 34 68 78 37 75 72 33 77 66 65 68 67 61 74 6b 77 |4hx7ur3wfehgatkw|
000000f0 61 75 38 6a 37 6e 70 76 66 33 6b 67 65 74 78 76 |au8j7npvf3kgetxv|
00000100 61 35 78 6a 36 6e 74 64 33 6b 6b 75 6d 6d 73 77 |a5xj6ntd3kkummsw|
00000110 39 65 38 78 61 72 34 77 65 6d 68 73 37 74 36 76 |9e8xar4wemhs7t6v|
00000120 39 33 78 78 65 72 39 76 65 6e 6b 73 36 74 32 64 |93xxer9venks6t2d|
00000130 64 6b 78 36 6d 6e 30 77 70 63 68 79 75 6d 70 76 |dkx6mn0wpchyumpv|
00000140 66 33 6b 67 65 74 78 76 61 35 78 6a 36 6e 74 64 |f3kgetxva5xj6ntd|
00000150 33 6b 6b 75 6d 6d 73 77 39 65 38 78 61 72 34 77 |3kkummsw9e8xar4w|
00000160 65 6d 68 73 37 74 36 64 76 65 6e 67 76 33 35 76 |emhs7t6dvengv35v|
00000170 39 33 78 78 65 72 39 76 65 6e 6b 73 36 74 32 64 |93xxer9venks6t2d|
00000180 64 6b 78 36 6d 6e 30 77 70 63 68 79 75 6d 35 77 |dkx6mn0wpchyum5w|
00000190 34 6d 38 77 37 72 65 30 66 73 6b 79 63 6d 79 76 |4m8w7re0fskycmyv|
000001a0 34 6e 78 77 36 72 66 64 66 34 6b 63 6d 74 77 64 |4nxw6rfdf4kcmtwd|
000001b0 61 63 38 7a 75 6e 6e 77 33 36 68 76 61 6d 63 30 |ac8zunnw36hvamc0|
000001c0 39 61 72 79 76 65 6e 77 33 36 68 76 61 6d 63 30 |9aryvenw36hvamc0|
000001d0 39 61 78 7a 63 6e 72 76 33 6a 6b 76 65 6d 67 64 |9axzcnrv3jkvemgd|
000001e0 39 34 78 6b 6d 72 64 64 65 68 68 71 75 74 6a 77 |94xkmrddehhqutjw|
000001f0 64 36 38 32 61 6e 68 30 70 75 68 35 63 71 7a 79 |d682anh0puh5cqzy|
00000200 73 33 75 77 63 6b 78 6e 65 61 77 37 6c 79 6d 6c |s3uwckxneaw7lyml|
00000210 35 33 6c 61 71 7a 6c 70 35 36 7a 75 71 34 68 73 |53laqzlp56zuq4hs|
00000220 37 36 64 64 75 38 67 6a 34 7a 79 39 38 6c 37 66 |76ddu8gj4zy98l7f|
00000230 6a 63 37 77 73 30 32 6a 70 7a 74 35 33 79 76 35 |jc7ws02jpzt53yv5|
00000240 77 68 65 65 79 72 6c 6a 6b 34 76 75 64 78 6d 36 |wheeyrljk4vudxm6|
00000250 73 6a 73 30 63 39 7a 35 73 70 34 71 76 68 74 68 |sjs0c9z5sp4qvhth|
00000260 32 72 66 36 70 70 79 67 71 38 66 72 6e 66 34 |2rf6ppygq8frnf4|
},
CreationDate: (time.Time) 2017-12-24 11:14:13.729410009 -0800 PST,
SettleDate: (time.Time) 0001-01-01 00:00:00 +0000 UTC,
Terms: (channeldb.ContractTerm) {
PaymentPreimage: ([32]uint8) (len=32 cap=32) {
00000000 81 39 59 4c d7 e7 df a5 60 44 74 bb fd f7 01 b8 |.9YL....`Dt.....|
00000010 fc 05 3a 1d ec 2d f7 c8 6d 2c a6 d2 c8 58 81 4f |..:..-..m,...X.O|
},
Value: (lnwire.MilliSatoshi) 4294967000 mSAT,
Settled: (bool) false
}
})
Wireframe + HTML/CSS for sendcoin
.
While running yarn
, the following error occurs
[2] ../third_party/boringssl/crypto/bio/fd.c: In function ‘fd_ctrl’: [2] ../third_party/boringssl/crypto/bio/fd.c:192:11: error: this statement may fall through [-Werror=implicit-fallthrough=] [2] num = 0; [2] ~~~~^~~ [2] ../third_party/boringssl/crypto/bio/fd.c:193:5: note: here [2] case BIO_C_FILE_SEEK: [2] ^~~~ [2] cc1: all warnings being treated as errors [2] boringssl.target.mk:439: recipe for target 'Release/obj.target/boringssl/third_party/boringssl/crypto/bio/fd.o' failed [2] make: *** [Release/obj.target/boringssl/third_party/boringssl/crypto/bio/fd.o] Error 1 [2] make: Leaving directory '/home/calvin/Git/zap-desktop/app/node_modules/grpc/build' [2] gyp ERR! build error [2] gyp ERR! stack Error:
make failed with exit code: 2
System Linux 4.13.0-16-generic
NPM 5.5.1
To open a channel between users, we need a QR code displaying the node details.
On the Lnd Syncing page, the word "across" is misspelled as "accross." To fix this, one can edit the text on the following line.
As per
Line 69 in 5f389c1
LN-Zap is already configured to be bundled as an AppImage. It would be great if you could provide an AppImage for download on GitHub Releases.
Providing an AppImage would have, among others, these advantages:
appimaged
--appimage-extract
parameterHere is an overview of projects that are already distributing upstream-provided, official AppImages.
If you have questions, AppImage developers are on #AppImage on irc.freenode.net.
On Ubuntu 16.04 after 'npm run dev':
(electron:7538): IBUS-WARNING **: Unable to connect to ibus: Could not connect: Connection refused (node:7504) DeprecationWarning: Chunk.modules is deprecated. Use Chunk.getNumberOfModules/mapModules/forEachModule/containsModule instead. at /home/kurisu/zap-desktop/node_modules/extract-text-webpack-plugin/index.js:271:24 at /home/kurisu/zap-desktop/node_modules/async/dist/async.js:3060:16 at eachOfArrayLike (/home/kurisu/zap-desktop/node_modules/async/dist/async.js:1003:9) at eachOf (/home/kurisu/zap-desktop/node_modules/async/dist/async.js:1051:5) at Object.eachLimit (/home/kurisu/zap-desktop/node_modules/async/dist/async.js:3122:5) at ExtractTextPlugin.<anonymous> (/home/kurisu/zap-desktop/node_modules/extract-text-webpack-plugin/index.js:268:10) at Compilation.applyPluginsAsyncSeries (/home/kurisu/zap-desktop/node_modules/tapable/lib/Tapable.js:142:13) at Compilation.seal (/home/kurisu/zap-desktop/node_modules/webpack/lib/Compilation.js:580:8) at /home/kurisu/zap-desktop/node_modules/webpack/lib/Compiler.js:510:16 at /home/kurisu/zap-desktop/node_modules/tapable/lib/Tapable.js:225:11 balance error: { Error: expected 1 macaroon, got 0 at /home/kurisu/zap-desktop/node_modules/grpc/src/node/src/client.js:554:15 code: 2, metadata: Metadata { _internal_repr: {} } } payments error: { Error: expected 1 macaroon, got 0 at /home/kurisu/zap-desktop/node_modules/grpc/src/node/src/client.js:554:15 code: 2, metadata: Metadata { _internal_repr: {} } } invoices error: { Error: expected 1 macaroon, got 0 at /home/kurisu/zap-desktop/node_modules/grpc/src/node/src/client.js:554:15 code: 2, metadata: Metadata { _internal_repr: {} } }
Right now all errors are simple logged to the console. We need to display errors that happen when trying to send a payment.
Work with @JimmyMow and @brandnanthny on the design
The channels category dropdown available (on top left) in the visual preview of channels page is not functional.
In the requirements yarn should be added. Here is potential a link to the instructions: Yarn
When using node 8.1.3 running on Ubuntu 16.04 I got the following message
npm run build-dll exited with code 0
flow-typed exited with code null
Then the install doesn't continue with no error message
Simply solved the issue by upgrading to 8.9. Someone might want to look into it
Followed these instructions: https://yalls.org/articles/cca5df93-2183-47a6-a611-0d68534e9c67
Tried to buy this: https://lightning.bitrefill.com/steam-eur-voucher/
But after entering the payment request into Zap and approving it, Zap hung on the loading screen, while LND reported: "Attempt to send payment * failed: TemporaryChannelFailure"
Seems we should handle errors and not block on retries...
LND backend code refactoring + documentation
Right now all errors are simple logged to the console. We need to display errors that happen when trying to create an invoice.
Work with @JimmyMow and @brandnanthny on the design
@torkelrogstad here is the issue to set up continuous integration for the project
For Sass files, when replacing @import '../../../../../../variables.scss'
with @import 'variables.scss'
, the sass-loader cannot resolve the path when npm run build-renderer
. However the resolved-paths are fine in the development environment.
There seems to be a problem with webpack/css-loader/sass-loader not recognizing the resolved paths. While preparing to npm run test
, npm run build-renderer
fails when resolved-paths for scss imports:
ERROR in ./node_modules/css-loader?{"modules":true,"importLoaders":1,"localIdentName":"[name]__[local]__[hash:base64:5]"}!./node_modules/sass-loader/lib/loader.js!./app/routes/wallet/components/Wallet.scss
Module build failed:
@import 'variables.scss';
^
File to import not found or unreadable: variables.scss.
This problem was found in PR #40
(I vote for styled-components^^)
When you follow the readme you have to run the command ./node_modules/.bin/electron-rebuild
. Since the package.json file doesn't include it it means you have to download it yourself which isn't hard, it's just a small inconvenient step.
Each LND node can set their node alias. This will improve the overall UX and enable cooler features if we allow users to give their node a "username"
Talk to @brandnanthny and I for design for this
Right now all errors are simple logged to the console. We need to display errors that happen when trying to connect to a peer.
Work with @JimmyMow and @brandnanthny on the design
After the setup with yarn, running npm run dev
gets stuck at " 0% - syncing your lightning node to the blockchain".
The console outputs the following:
[0] Failed to read content scripts { Error: EACCES: permission denied, open '/Users/user/Library/Application Support/Electron/extensions/fmkadmapgofadopljbjfkapdkoienihi/build/inject.js'
[0] at Object.fs.openSync (fs.js:584:18)
[0] at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:173:20)
[0] at Object.fs.readFileSync (fs.js:491:33)
[0] at Object.fs.readFileSync (ELECTRON_ASAR.js:506:29)
[0] at readArrayOfFiles (/Users/user/code/zap-desktop/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:233:23)
[0] at Array.map (native)
[0] at contentScriptToEntry (/Users/user/code/zap-desktop/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:240:21)
[0] at Array.map (native)
[0] at injectContentScripts (/Users/user/code/zap-desktop/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:248:48)
[0] at loadExtension (/Users/user/code/zap-desktop/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:277:3)
[0] errno: -13,
[0] code: 'EACCES',
[0] syscall: 'open',
[0] path: '/Users/user/Library/Application Support/Electron/extensions/fmkadmapgofadopljbjfkapdkoienihi/build/inject.js' }
[0] icon: /Users/user/code/zap-desktop/resources/icon.icns
[0] 2017-11-23 09:02:44.227 Electron[98411:683864] *** WARNING: Textured window <AtomNSWindow: 0x7ffafceab6f0> is getting an implicitly transparent titlebar. This will break when linking against newer SDKs. Use NSWindow's -titlebarAppearsTransparent=YES instead.
[0] lnd shutting down null
[0] Failed to read content scripts { Error: EACCES: permission denied, open '/Users/user/Library/Application Support/Electron/extensions/fmkadmapgofadopljbjfkapdkoienihi/build/inject.js'
[0] at Object.fs.openSync (fs.js:584:18)
[0] at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:173:20)
[0] at Object.fs.readFileSync (fs.js:491:33)
[0] at Object.fs.readFileSync (ELECTRON_ASAR.js:506:29)
[0] at readArrayOfFiles (/Users/user/code/zap-desktop/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:233:23)
[0] at Array.map (native)
[0] at contentScriptToEntry (/Users/user/code/zap-desktop/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:240:21)
[0] at Array.map (native)
[0] at injectContentScripts (/Users/user/code/zap-desktop/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:248:48)
[0] at loadExtension (/Users/user/code/zap-desktop/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:277:3)
[0] errno: -13,
[0] code: 'EACCES',
[0] syscall: 'open',
[0] path: '/Users/user/Library/Application Support/Electron/extensions/fmkadmapgofadopljbjfkapdkoienihi/build/inject.js' }
[0] 2017-11-23 09:02:46.397 Electron Helper[98416:684273] Couldn't set selectedTextBackgroundColor from default ()
The file exists:
-rw-r--r-- 1 user staff 327K Sep 1 18:20 backend.js
-rw-r--r-- 1 user staff 3.0K Sep 1 18:20 background.js
-rw-r--r-- 1 user staff 1.6K Sep 1 18:20 contentScript.js
-rwxrwxrwx 1 user staff 10K Sep 1 18:20 inject.js
-rw-r--r-- 1 user staff 1.7K Sep 1 18:20 main.js
-rw-r--r-- 1 user staff 1.2M Sep 1 18:20 panel.js
Note, I gave inject.js
777 permission to try and see if that would fix it.
We can issue the partial channel creation rpc calls and check if we get the expected failure code, so that we can show validation immediately on the relevant modal page.
E.g.
$ lncli openchannel --local_amt=1000000000000 --node_key=02dc5e775414dd2167049200298632d5e2e68593f729298cf3945e60ab4d62fcc7
[lncli] rpc error: code = Unknown desc = funding amount is too large, the max channel size is: 0.16777216 BTC
I think adopting redux-form would be helpful for this.
https://redux-form.com/
Right now we run LND with --no-macaroons
, we should add macaroon support
I took a peek at the main.dev.js file and I noticed that electron doesn't have the sandbox protection on when creating the BrowserWindow. The sandbox provided by Chromium is actually quite nice and ahead of most other browser engines. The past few years we've seen many exploits targeted at browsers (we're looking at you firefox..) and enabling the sandbox makes successful exploits much harder/impossible to execute.
In the current state, if an attacker finds an XSS vulnerability then he has complete control over your computer. They can use plain JavaScript in combination with the Node API and do literally anything. The sandbox would prevent that, and additionally provide another layer of security against exploits targeted at the underlying browser engine.
There are a few drawbacks to enabling the sandbox, more specifically: it disables the Node environment in the renderer process (the actual .js files loaded by .html files etc). This makes communications between the frontend and the backend become a bit more complex. Without Node there is no way to communicate, so a special "preload" script is used to setup those communications. Moving to "communication over IPC" can be difficult depending on how much of the existing code is using the Node APIs in the renderer processes.
I've started a small repo today with quite a thorough code example of why and how you can enable the sandbox and still have a communication between front and backend. You can find it here.
There aren't any other code examples out there so I decided to make one. It's certainly missing some information to explain the terminology and how all of it works so I'm happy to answer any questions you might have, just open issues in the repo I linked above.
It would be better to have single text input for Node URI (Peer connecting) in public_key@ip_address:port
format rather than having two inputs.
Other LN clients support it this way and LN explorers (like https://explorer.acinq.co) will provide URI this way too.
I can do a PR if you agree.
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.