Merge pull request #9242 from filecoin-project/fix/ledger-reject-error

fix: ux: better ledger rejection error
This commit is contained in:
Aayush Rajasekaran 2022-09-01 11:29:46 -04:00 committed by GitHub
commit c147e315db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ package cli
import (
"encoding/hex"
"fmt"
"strings"
"github.com/urfave/cli/v2"
"golang.org/x/xerrors"
@ -152,6 +153,9 @@ var sendCmd = &cli.Command{
sm, err := InteractiveSend(ctx, cctx, srv, proto)
if err != nil {
if strings.Contains(err.Error(), "no current EF") {
return xerrors.Errorf("transaction rejected on ledger: %w", err)
}
return err
}