peterzen / kohola Goto Github PK
View Code? Open in Web Editor NEWMulti platform dcrwallet frontend for power users
License: ISC License
Multi platform dcrwallet frontend for power users
License: ISC License
After some startups,WebKitNetworkProcess
eats 100% CPU. Can't always reproduce - it happens around 50% or so of the time, not after all startups.
May have something to do with a race condition in exchangeratebot/coingecko.go
but needs further investigation/profiling.
32321 peter 20 0 82.425g 50980 37108 R 98.7 0.3 0:31.05 WebKitNetworkProcess
On the frontend, the user should be able to add labels to UTXOs and transactions (both on existing transactions and in the Receive dialog - in the latter case the label should be associated with the generated receive address and later linked to the incoming TX).
The labels should be stored in a local database which does not exist yet; perhaps LevelDB.
Reimplement app config unlock passphrase input using OS native dialog: https://github.com/gen2brain/dlgs
The timestamp
field currently used as key
prop, but that isn't unique.
When the dropdown is changed, the below warning is logged:
2react-dom.development.js:89 Warning: Cannot update a component from inside the function body of a different component.
in ExchangeRateChart (created by ConnectFunction)
in ConnectFunction (created by Market)
in div (created by CardBody)
in CardBody (created by Market)
in div (created by Card)
in Card (created by Market)
in div (created by Market)
in div (created by Col)
in Col (created by Market)
in div (created by Row)
in Row (created by Market)
in div (created by Market)
in Market (created by ConnectFunction)
in ConnectFunction (created by Context.Consumer)
in withRouter(Connect(Market)) (created by Context.Consumer)
in Route (created by App)
in Switch (created by App)
in div (created by Container)
in Container (created by App)
in div (created by AppSidebar)
in div (created by AppSidebar)
in div (created by AppSidebar)
in AppSidebar (created by ConnectFunction)
in ConnectFunction (created by App)
in main (created by App)
in Router (created by ConnectedRouter)
in ConnectedRouter (created by Context.Consumer)
in ConnectedRouterWithContext (created by ConnectFunction)
in ConnectFunction (created by App)
in App (created by ConnectFunction)
in ConnectFunction (created by HotExportedConnect(App))
in AppContainer (created by HotExportedConnect(App))
in HotExportedConnect(App)
in Provider
in AppContainer
The charts in the market section in a proof of concept state right now, they need to be fixed up:
frontend/src/features/market/marketSlice.ts
. We probably need to adjust the displayed axis values through the recharts
APIreplace
's in go.mod
The TB and mixer default settings templates are currently not linked to an endpoint ID in the configuration. This leads to the wrong template to be loaded after the user switches to a different endpoint.
Solution: save the templates in the WalletPreferences
object.
google.golang.org/protobuf/proto
Should we let users disable the config file encryption?
Cons:
$HOME
usually is), TimeCapsule and other snapshot/backup schemes pick it up and back it up right away -> if a user disables the encryption by mistake, they will have to roll their wallet credentials over to undo the damage.Pros:
Should we let our users shoot themselves in the foot? If this is really needed, they can manually remove the config file and create a new one without the encryption turned on.
CreateTransaction
methodSendTransaction
CreateTransaction
Using https://github.com/buildo/react-placeholder, implement skeleton screens in the top level components.
<Card>...</Card>
comps, in the same file.<ReactPlaceholder...>
loading
prop that can be passed to ReactPlaceholder
Add UTXO selection ability to the Send transaction GUI flow
dcrwallet
goroutine 0 [idle]:
runtime: unknown pc 0x7f4d3370e18b
stack: frame={sp:0x7f4d037fd650, fp:0x0} stack=[0x7f4d02ffdef0,0x7f4d037fdaf0)
0x00007f4d037fd550: 0x0000000000000000 0x0000000833bc6a46
0x00007f4d037fd560: 0x00007f4cfc01b900 0x00007f4d357146d8
0x00007f4d037fd570: 0xffffffff00000000 0x00007f4d037fd590
0x00007f4d037fd580: 0x00007f4d037fd750 0x0000000000000004
0x00007f4d037fd590: 0x0000000000000003 0x00007f4cfc01bc30
0x00007f4d037fd5a0: 0x0000000000000100 0x0000000000000090
0x00007f4d037fd5b0: 0x0000000000000008 0x00007f4cfc020840
0x00007f4d037fd5c0: 0x00007f4d037fd770 0x00007f4d037fd760
0x00007f4d037fd5d0: 0x0000000003cb8020 0x00007f4d33c91c23
0x00007f4d037fd5e0: 0x0000000003d46b00 0x00007f4d037fd728
0x00007f4d037fd5f0: 0x0000000000000060 0x0000000000000007
0x00007f4d037fd600: 0x0000000003db8b20 0x00007f4d33c920f3
0x00007f4d037fd610: 0x0000000000000001 0x00007f4cfc020950
0x00007f4d037fd620: 0x00000000000003aa 0x0000000000000004
0x00007f4d037fd630: 0x00007f4d037fd7e0 0x00007f4d037fd7d0
0x00007f4d037fd640: 0x0000000003cb8020 0x00007f4d33c91c23
0x00007f4d037fd650: <0x0000000000000000 0x0000000000000008
0x00007f4d037fd660: 0x00007f4d037fd680 0x0000000000000008
0x00007f4d037fd670: 0x00007f4cfc020940 0x00007f4d33bcfbea
0x00007f4d037fd680: 0x0000000000000001 0x9d5feb2a7009ef00
0x00007f4d037fd690: 0x00007f4c000003aa 0x0000000003cfd240
0x00007f4d037fd6a0: 0x00007f4cfc00a100 0x00007f4d33b856e0
0x00007f4d037fd6b0: 0x0000000003d37770 0x00007f4cfc020950
0x00007f4d037fd6c0: 0x0000000000000001 0x00007f4d33b839c8
0x00007f4d037fd6d0: 0xfffffffe7fffffff 0xffffffffffffffff
0x00007f4d037fd6e0: 0xffffffffffffffff 0xffffffffffffffff
0x00007f4d037fd6f0: 0xffffffffffffffff 0xffffffffffffffff
0x00007f4d037fd700: 0xffffffffffffffff 0xffffffffffffffff
0x00007f4d037fd710: 0xffffffffffffffff 0xffffffffffffffff
0x00007f4d037fd720: 0xffffffffffffffff 0xffffffffffffffff
0x00007f4d037fd730: 0xffffffffffffffff 0xffffffffffffffff
0x00007f4d037fd740: 0xffffffffffffffff 0xffffffffffffffff
runtime: unknown pc 0x7f4d3370e18b
stack: frame={sp:0x7f4d037fd650, fp:0x0} stack=[0x7f4d02ffdef0,0x7f4d037fdaf0)
0x00007f4d037fd550: 0x0000000000000000 0x0000000833bc6a46
0x00007f4d037fd560: 0x00007f4cfc01b900 0x00007f4d357146d8
0x00007f4d037fd570: 0xffffffff00000000 0x00007f4d037fd590
0x00007f4d037fd580: 0x00007f4d037fd750 0x0000000000000004
0x00007f4d037fd590: 0x0000000000000003 0x00007f4cfc01bc30
0x00007f4d037fd5a0: 0x0000000000000100 0x0000000000000090
0x00007f4d037fd5b0: 0x0000000000000008 0x00007f4cfc020840
0x00007f4d037fd5c0: 0x00007f4d037fd770 0x00007f4d037fd760
0x00007f4d037fd5d0: 0x0000000003cb8020 0x00007f4d33c91c23
0x00007f4d037fd5e0: 0x0000000003d46b00 0x00007f4d037fd728
0x00007f4d037fd5f0: 0x0000000000000060 0x0000000000000007
0x00007f4d037fd600: 0x0000000003db8b20 0x00007f4d33c920f3
0x00007f4d037fd610: 0x0000000000000001 0x00007f4cfc020950
0x00007f4d037fd620: 0x00000000000003aa 0x0000000000000004
0x00007f4d037fd630: 0x00007f4d037fd7e0 0x00007f4d037fd7d0
0x00007f4d037fd640: 0x0000000003cb8020 0x00007f4d33c91c23
0x00007f4d037fd650: <0x0000000000000000 0x0000000000000008
0x00007f4d037fd660: 0x00007f4d037fd680 0x0000000000000008
0x00007f4d037fd670: 0x00007f4cfc020940 0x00007f4d33bcfbea
0x00007f4d037fd680: 0x0000000000000001 0x9d5feb2a7009ef00
0x00007f4d037fd690: 0x00007f4c000003aa 0x0000000003cfd240
0x00007f4d037fd6a0: 0x00007f4cfc00a100 0x00007f4d33b856e0
0x00007f4d037fd6b0: 0x0000000003d37770 0x00007f4cfc020950
0x00007f4d037fd6c0: 0x0000000000000001 0x00007f4d33b839c8
0x00007f4d037fd6d0: 0xfffffffe7fffffff 0xffffffffffffffff
0x00007f4d037fd6e0: 0xffffffffffffffff 0xffffffffffffffff
0x00007f4d037fd6f0: 0xffffffffffffffff 0xffffffffffffffff
0x00007f4d037fd700: 0xffffffffffffffff 0xffffffffffffffff
0x00007f4d037fd710: 0xffffffffffffffff 0xffffffffffffffff
0x00007f4d037fd720: 0xffffffffffffffff 0xffffffffffffffff
0x00007f4d037fd730: 0xffffffffffffffff 0xffffffffffffffff
0x00007f4d037fd740: 0xffffffffffffffff 0xffffffffffffffff
goroutine 7 [syscall]:
runtime.cgocall(0xe59fb0, 0xc000054780)
/usr/local/go/src/runtime/cgocall.go:156 +0x5c fp=0xc000054758 sp=0xc000054720 pc=0x48a13c
github.com/getlantern/systray._Cfunc_nativeLoop()
_cgo_gotypes.go:121 +0x48 fp=0xc000054780 sp=0xc000054758 pc=0xcc6348
github.com/getlantern/systray.nativeLoop(...)
/home/user/go/pkg/mod/github.com/getlantern/[email protected]/systray_nonwindows.go:23
github.com/getlantern/systray.Run(0xc00015a000, 0x0)
/home/user/go/pkg/mod/github.com/getlantern/[email protected]/systray.go:78 +0x1f fp=0xc0000547a0 sp=0xc000054780 pc=0xcc5a9f
github.com/peterzen/kohola/walletgui.InitSystray({0x1333b48, 0xc000032700})
/home/user/Work/decred/cspp_fiddle/kohola/app/walletgui/systray.go:16 +0x53 fp=0xc0000547c0 sp=0xc0000547a0 pc=0xdba8b3
main.main·dwrap·5()
/home/user/Work/decred/cspp_fiddle/kohola/app/main.go:32 +0x2a fp=0xc0000547e0 sp=0xc0000547c0 pc=0xe51a4a
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc0000547e8 sp=0xc0000547e0 pc=0x4ef3e1
created by main.main
/home/user/Work/decred/cspp_fiddle/kohola/app/main.go:32 +0x11a
goroutine 1 [syscall, locked to thread]:
github.com/webview/webview._Cfunc_webview_run(0x3df4570)
_cgo_gotypes.go:230 +0x45
github.com/webview/webview.(*webview).Run.func1(0x884a26)
/home/user/go/pkg/mod/github.com/webview/[email protected]/webview.go:171 +0x3a
github.com/webview/webview.(*webview).Run(0xefa920)
/home/user/go/pkg/mod/github.com/webview/[email protected]/webview.go:171 +0x19
github.com/peterzen/kohola/webview.(*webviewUI).Run(0x10a38f5)
/home/user/Work/decred/cspp_fiddle/kohola/app/webview/webview.go:37 +0x22
main.startUI({0x1333b48, 0xc000032700})
/home/user/Work/decred/cspp_fiddle/kohola/app/main.go:53 +0x242
main.main()
/home/user/Work/decred/cspp_fiddle/kohola/app/main.go:34 +0x129
goroutine 26 [select]:
github.com/peterzen/kohola/walletgui.onReady.func1()
/home/user/Work/decred/cspp_fiddle/kohola/app/walletgui/systray.go:28 +0x78
created by github.com/peterzen/kohola/walletgui.onReady
/home/user/Work/decred/cspp_fiddle/kohola/app/walletgui/systray.go:26 +0xfd
rax 0x0
rbx 0x7f4d037fe700
rcx 0x7f4d3370e18b
rdx 0x0
rdi 0x2
rsi 0x7f4d037fd650
rbp 0x7f4ceb3fa340
rsp 0x7f4d037fd650
r8 0x0
r9 0x7f4d037fd650
r10 0x8
r11 0x246
r12 0x7f4ceb5e8690
r13 0x7f4ceb5f9030
r14 0x7f4d39a951e0
r15 0x3dc2140
rip 0x7f4d3370e18b
rflags 0x246
cs 0x33
fs 0x0
gs 0x0
In the app back-end, implement a background process that continuously fetches DCR-BTC, DCR-USD and potentially, other fiat pairs from a set of (configurable) exchanges.
The exchange API endpoints should be configurable in the frontend Settings page.
The implementation may use the dcrrates
server but this is TBD - though if it is an overkill in terms of resources used.
Starting point: https://github.com/decred/dcrdata/blob/master/exchanges/bot.go
For self contained, cross platform builds that do not require Chrome to be installed, Webview should be implemented, in addition to the existing lorca approach. The current Lorca implementation should ideally be kept, and there would be an abstraction layered developed so that the use of lorca vs webview can be decided at build time. (Lorca is much faster to develop with so we want to keep that.)
https://github.com/zserge/webview
*ExportAPI
Go functionsImplement a backend API method that opens https:// URLs using the system default browser.
Implement an OS native systray menu using https://github.com/getlantern/systray
The menu items in the first iteration should be:
Show window should bring the main window to the focus, Quit should exit the app.
main.go
README
, build scripts, Dockerfile
At the moment, the configuration stores the full pathname to the rpc client cert. This should be changed so that the cert blob is directly stored in the config file so that it does not have to lay around in the file system unprotected (=>with the config file being encrypted that will also protect the cert.)
cert_blob
input: https://github.com/peterzen/dcrwalletgui/blob/a0d1cb395a2b89afa52bb099d217bf2f9ab8382e/frontend/src/features/appconfiguration/RPCEndpointConfigForm.tsx#L169This should enable the user to paste in the cert (which they obtained through an SSH session from the server so that the cert never has to leave that machine).
cert_file_name
, appconfig.go
/ SetConfig
would read the cert contents.The app configuration JSON file should be encrypted using a user provided passphrase, if the user chooses to enable this. The encryption process should happen in the backend and be transparent to the frontend.
The wallet and account totals component needs to be redesigned into something that makes sense. (The existing layout is a placeholder.)
It should:
Add scripts that build a single executable binary.
https://github.com/zserge/lorca/tree/master/examples/counter
sweepAccount
func to walletapi.go
(constructTransaction
is a good starting template to use)ExportWalletAPI
lorca.ts
src/features/transactions
ConstructTxDialog
is a good starting point as SweepAccount
has similar inputs. The modal should be accessible from a (to be added) Tools menu, similarly to that on the Staking page (StakingToolsMenu.tsx
):API doc: https://github.com/decred/dcrwallet/blob/master/rpc/documentation/api.md#sweepaccount
TX notifications are displayed more than once, due to dcrwallet
sending multiple unminedTx
messages.
processTransactionNotification should only process those messages that are actually informative (for instance, it should not send notifications for the 0 DCR transactions that are associated with ticket purchases. There are also 2 notifications when sending funds.)
The duplicated messages dcrwallet is sending are correct; but processTransactionNotification
should know better which ones to notify the user about.
When the config file encryption is enabled, the dark mode activates only after the passphrase prompt. To fix that, the theme config option should be cached within the browser window itself (localStorage
, cookie, etc).
The cache needs to work in production mode when the webview
renderer is used (
Line 26 in 2a2c11f
true
. (The webview might not have the same localStorage ability as Lorca UI)Implement desktop notifications using beeep:
https://github.com/gen2brain/beeep
dcrwallet.proto
walletgui/notifications.go
appbackend.ts
sendDesktopNotification
redux action in features/app/appSlice.ts
frontend/src/features/transactions/actions.ts:75
When mistyping the config unlock password no error message is being shown. The error condition is being handled correctly.
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.