-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.go
53 lines (44 loc) · 1017 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package main
import (
"fmt"
"github.com/mindsgn-studio/pocket-money-go/database"
"github.com/mindsgn-studio/pocket-money-go/ethereum"
"github.com/mindsgn-studio/pocket-money-go/logs"
)
func WalletExists() bool {
return false
}
func InitialiseWallet(password string) bool {
initialised := database.InitialiseWallet(password)
if initialised {
logs.LogError("Wallet Initialised")
return true
} else {
logs.LogError("Wallet Failed Initialised")
return false
}
}
func CreateWallet(name string, password string) bool {
switch name {
case "ethereum":
ethereum.CreateNewEthereumWallet(password)
return true
default:
return false
}
}
func GetWallets(password string) []database.Wallet {
wallets := database.GetWallets(password)
return wallets
}
func GetTotalBalance(password string) {
wallets, err := ethereum.GetTotalBalance(password, "testnet")
if err != nil {
fmt.Println(err)
}
fmt.Println(wallets)
}
func main() {
InitialiseWallet("123456789")
GetTotalBalance("123456789")
}