default fallback NatSpec messages

This commit is contained in:
zsfelfoldi
2015-04-08 12:35:02 +02:00
committed by zelig
parent 8e6a068d2d
commit b46e152171
3 changed files with 51 additions and 23 deletions

View File

@ -143,14 +143,7 @@ var net = web3.net;
var ds, _ = docserver.New(utils.JSpathFlag.String())
func (self *jsre) ConfirmTransaction(tx string) bool {
var notice string
nat, err := natspec.New(self.xeth, tx, ds)
if err == nil {
notice, err = nat.Notice()
}
if err != nil {
notice = fmt.Sprintf("About to submit transaction: %v")
}
notice := natspec.GetNotice(self.xeth, tx, ds)
fmt.Println(notice)
answer, _ := self.Prompt("Confirm Transaction\n[y/n] ")
return strings.HasPrefix(strings.Trim(answer, " "), "y")