Skip to content

Commit b93f5f3

Browse files
authored
chore(ledger): format fix (#1243)
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
1 parent 5bd2560 commit b93f5f3

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

ledger/error.go

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,10 @@ func (e *CollateralContainsNonADA) MarshalCBOR() ([]byte, error) {
758758
}
759759
// Bounds check
760760
if constantToUse < 0 || constantToUse > 255 {
761-
return nil, fmt.Errorf("CollateralContainsNonADA: invalid constructor index %d (must be 0-255)", constantToUse)
761+
return nil, fmt.Errorf(
762+
"CollateralContainsNonADA: invalid constructor index %d (must be 0-255)",
763+
constantToUse,
764+
)
762765
}
763766
e.Type = uint8(constantToUse)
764767
arr := []any{constantToUse, e.Provided.Value()}
@@ -792,18 +795,28 @@ func (e *CollateralContainsNonADA) UnmarshalCBOR(data []byte) error {
792795
}
793796
}
794797
if !isValid {
795-
return fmt.Errorf("CollateralContainsNonADA: expected one of constructor indices %v, got %d", validConstructors, tmp.ConstructorIdx)
798+
return fmt.Errorf(
799+
"CollateralContainsNonADA: expected one of constructor indices %v, got %d",
800+
validConstructors,
801+
tmp.ConstructorIdx,
802+
)
796803
}
797804
if tmp.ConstructorIdx > uint64(255) {
798-
return fmt.Errorf("CollateralContainsNonADA: constructor index %d exceeds uint8 range (0-255)", tmp.ConstructorIdx)
805+
return fmt.Errorf(
806+
"CollateralContainsNonADA: constructor index %d exceeds uint8 range (0-255)",
807+
tmp.ConstructorIdx,
808+
)
799809
}
800810
e.Type = uint8(tmp.ConstructorIdx)
801811
e.Provided = tmp.Provided
802812
return nil
803813
}
804814

805815
func (e *CollateralContainsNonADA) Error() string {
806-
return fmt.Sprintf("CollateralContainsNonADA (Provided %v)", e.Provided.Value())
816+
return fmt.Sprintf(
817+
"CollateralContainsNonADA (Provided %v)",
818+
e.Provided.Value(),
819+
)
807820
}
808821

809822
type WrongNetworkInTxBody struct {

0 commit comments

Comments
 (0)