-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
32 lines (27 loc) · 839 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/dialog"
"go_diffie_hellman_chat/internal/config"
"go_diffie_hellman_chat/internal/services"
"go_diffie_hellman_chat/internal/storage"
"go_diffie_hellman_chat/internal/ui"
)
func main() {
c := config.DefaultConfig()
application := app.New()
window := application.NewWindow("DiffHell")
window.Resize(fyne.NewSize(400, 500))
account, err := storage.LoadAccount("./account.json")
if err != nil {
//dialog.ShowError(err, window)
dialog.ShowInformation(
"Create account",
"If you already have a private key for Ethereum network,\nyou can create an account with this key,\nthen all your messages will be displayed in your account",
window,
)
}
ui.ShowAccountScreen(c, window, account, services.CreateAccount)
window.ShowAndRun()
}