mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +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 (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||||
"github.com/ethereum/go-ethereum/internal/ethapi"
|
"github.com/ethereum/go-ethereum/internal/ethapi"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/ethereum/go-ethereum/log"
|
||||||
|
|
@ -264,7 +264,11 @@ func (ui *CommandlineUI) ShowInfo(message string) {
|
||||||
|
|
||||||
func (ui *CommandlineUI) OnApprovedTx(tx ethapi.SignTransactionResult) {
|
func (ui *CommandlineUI) OnApprovedTx(tx ethapi.SignTransactionResult) {
|
||||||
fmt.Printf("Transaction signed:\n ")
|
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) {
|
func (ui *CommandlineUI) OnSignerStartup(info StartupInfo) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue