mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
signer: tidy up output of OnApprovedTx
This commit is contained in:
parent
947405e972
commit
656b1659eb
1 changed files with 6 additions and 2 deletions
|
|
@ -18,12 +18,12 @@ package core
|
|||
|
||||
import (
|
||||
"bufio"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
"github.com/ethereum/go-ethereum/internal/ethapi"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
|
|
@ -264,7 +264,11 @@ func (ui *CommandlineUI) ShowInfo(message string) {
|
|||
|
||||
func (ui *CommandlineUI) OnApprovedTx(tx ethapi.SignTransactionResult) {
|
||||
fmt.Printf("Transaction signed:\n ")
|
||||
spew.Dump(tx.Tx)
|
||||
if jsn, err := json.MarshalIndent(tx.Tx, " ", " "); err != nil {
|
||||
fmt.Printf("WARN: marshalling error %v\n", err)
|
||||
} else {
|
||||
fmt.Println(string(jsn))
|
||||
}
|
||||
}
|
||||
|
||||
func (ui *CommandlineUI) OnSignerStartup(info StartupInfo) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue