func (this *AccountInfoOperationQuary) execute(isSync bool) {
	addr := this.input_addr()
	if len(addr) > 0 && publicdefine.VerifyGAddress(addr) == nil {
		this.quary(addr)
	} else {
		ConsoleColor.Printf(ConsoleColor.C_RED,
			"\r\n"+this.infoStrings[this.languageIndex][AIOQ_INFO_ADDR_FORMAT_ERR]+"\r\n\r\n", addr)
	}
	if !isSync {
		this.ASyncChan <- 0
	}
}
Ejemplo n.º 2
0
func (this *MergeAccount) input_DestAddr() string {
	fmt.Printf(this.infoStrings[this.languageIndex][MA_INFO_INPUT_DEST_ADDR])

	var input string

	_, err := fmt.Scanf("%s\n", &input)
	if err == nil {
		if publicdefine.VerifyGAddress(input) == nil {
			return input
		}
	}
	return ""
}
Ejemplo n.º 3
0
func (this *AccountInfoPayment) input_SrcAddr() string {
	fmt.Printf(this.infoStrings[this.languageIndex][AIP_INFO_INPUT_PUBLIC_ADDR])

	var input string

	_, err := fmt.Scanf("%s\n", &input)
	if err == nil {
		if publicdefine.VerifyGAddress(input) == nil {
			return input
		}
	}
	return ""
}
Ejemplo n.º 4
0
func (this *AccountInfoBase) checkAddrs(addrs []string) []string {
	ret := make([]string, 0)
	for _, itm := range addrs {
		tmp := strings.TrimFunc(itm, func(r rune) bool {
			return r == '\n' || r == '\r' || r == ' '
		})
		if publicdefine.VerifyGAddress(tmp) == nil {
			ret = append(ret, tmp)
		} else {
			ConsoleColor.Printf(ConsoleColor.C_RED, this.infoStrings[this.languageIndex][AIB_INFO_ADDR_FORMAT_ERR],
				itm)
			// fmt.Printf(this.infoStrings[this.languageIndex][AIB_INFO_ADDR_FORMAT_ERR],
			// 	itm)
		}
	}
	return ret
}