Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gouthamp-stellar committed Nov 26, 2024
1 parent 3dd1686 commit b876e3f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions internal/tss/utils/operation_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ func BuildOperations(txOpXDRs []string) ([]txnbuild.Operation, error) {
operation = &txnbuild.SetOptions{}
case xdr.OperationTypeChangeTrust:
operation = &txnbuild.ChangeTrust{}
case xdr.OperationTypeAllowTrust:
operation = &txnbuild.AllowTrust{}
case xdr.OperationTypeAccountMerge:
operation = &txnbuild.AccountMerge{}
case xdr.OperationTypeInflation:
Expand Down Expand Up @@ -78,8 +76,13 @@ func BuildOperations(txOpXDRs []string) ([]txnbuild.Operation, error) {
operation = &txnbuild.ExtendFootprintTtl{}
case xdr.OperationTypeRestoreFootprint:
operation = &txnbuild.RestoreFootprint{}
default:
return nil, fmt.Errorf("unrecognized op")
}
err = operation.FromXDR(decodedOp)
if err != nil {
return nil, fmt.Errorf("decoding Operation FromXDR")
}
operation.FromXDR(decodedOp)
operations = append(operations, operation)
}
return operations, nil
Expand Down

0 comments on commit b876e3f

Please sign in to comment.