-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmergencyFunction.go
More file actions
38 lines (32 loc) · 1.04 KB
/
EmergencyFunction.go
File metadata and controls
38 lines (32 loc) · 1.04 KB
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
package main
import (
"fmt"
"stellarTools/buildingTransaction"
"stellarTools/getFromKyeboard"
"stellarTools/gettingAccountDetails"
)
func main() {
fmt.Println("Enter the Public Key: ")
account2_publicKey := getFromKyeboard.FromKeyboard()
balance := gettingAccountDetails.GetBalance(account2_publicKey)
fmt.Println()
fmt.Println()
//fmt.Println(balance[0].Balance)
//fmt.Println(len(balance[0].Balance))
//fmt.Println(balance[0].Balance[0:3])
// you have to turn it back the to string, otherwise is unicode
len := len(balance[0].Balance)
var amount string
for i := 0; i< len; i++ {
if string(balance[0].Balance[i]) == "." {
break
}
//fmt.Println(balance[0].Balance[i])
amount += string(balance[0].Balance[i])
}
//fmt.Println("Enter the amount: ")
//amount := getFromKyeboard.FromKeyboard()
buildingTransaction.SendMXC(account2_publicKey, "SCYWWO3FSPBHAYB5PTO35X2SU65MOLVTDOGO4MZAFQ2UQ2Y76PWV6S34", amount, "GDNDAZ4Q56GWNM3U3QQZZQXZCC5LPCB4EO2DTB6QLLC2ADVHM4TEKRJ2")
//
gettingAccountDetails.GetBalance(account2_publicKey)
}