Skip to content

Commit

Permalink
fix(logic): fix some typos in naming and description
Browse files Browse the repository at this point in the history
  • Loading branch information
ccamel committed Nov 7, 2023
1 parent c1a05f8 commit e966ad6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions x/logic/predicate/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import (
//
// The signature is as follows:
//
// chain_id(?ChainID)
// chain_id(?ID)
//
// where:
// - ChainID represents the current chain ID at the time of the query.
// - ID represents the current chain ID at the time of the query.
//
// Examples:
//
// # Query the current chain ID.
// - chain_id(ChainID).
// - chain_id(ID).
func ChainID(vm *engine.VM, chainID engine.Term, cont engine.Cont, env *engine.Env) *engine.Promise {
return engine.Delay(func(ctx context.Context) *engine.Promise {
sdkContext, err := util.UnwrapSDKContext(ctx)
Expand Down
2 changes: 1 addition & 1 deletion x/logic/predicate/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func CryptoDataHash(

result, err := util.Hash(algorithm, decodedData)
if err != nil {
engine.Error(fmt.Errorf("sha_hash/2: failed to hash data: %w", err))
engine.Error(fmt.Errorf("%s: failed to hash data: %w", functor, err))
}

return engine.Unify(vm, hash, BytesToList(result), cont, env)
Expand Down
2 changes: 1 addition & 1 deletion x/logic/predicate/crypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/okp4/okp4d/x/logic/types"
)

func TestCrypto(t *testing.T) {
func TestCryptoOperations(t *testing.T) {
Convey("Given a test cases", t, func() {
cases := []struct {
program string
Expand Down

0 comments on commit e966ad6

Please sign in to comment.