Skip to content

Commit

Permalink
chore: updated Encode method so don't need to include onlySigning input
Browse files Browse the repository at this point in the history
  • Loading branch information
JCrawsh committed Jan 4, 2024
1 parent 6aa7aac commit 918c80c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions binary-codec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ func encode(tx transactions.Tx, onlySigning bool, mutations map[string]types.Fie

// Encode converts a JSON transaction object to a hex string in the canonical binary format.
// The binary format is defined in XRPL's core codebase.
func Encode(tx transactions.Tx, onlySigning bool) (string, error) {
return encode(tx, onlySigning, nil)
func Encode(tx transactions.Tx) (string, error) {
return encode(tx, false, nil)
}

// EncodeForMultiSign: encodes a transaction into binary format in preparation for providing one
Expand Down Expand Up @@ -73,7 +73,7 @@ func EncodeForMultisigning(tx transactions.Tx, xrpAccountID string) (string, err
// Encodes a transaction into binary format in preparation for signing.
func EncodeForSigning(tx transactions.Tx) (string, error) {

encoded, err := Encode(tx, true)
encoded, err := encode(tx, true, nil)

if err != nil {
return "", err
Expand Down
2 changes: 1 addition & 1 deletion binary-codec/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func TestEncode(t *testing.T) {

for _, tc := range tt {
t.Run(tc.description, func(t *testing.T) {
got, err := Encode(tc.input, false)
got, err := Encode(tc.input)

if tc.expectedErr != nil {
require.EqualError(t, err, tc.expectedErr.Error())
Expand Down

0 comments on commit 918c80c

Please sign in to comment.