Skip to content

Commit

Permalink
fix(logic): make addressPairToBech32 private
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed Feb 23, 2023
1 parent bd57659 commit c31ba77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/logic/predicate/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func Bech32Address(vm *engine.VM, address, bech32 engine.Term, cont engine.Cont,

switch addressPair := env.Resolve(address).(type) {
case engine.Compound:
bech32Decoded, err := AddressPairToBech32(addressPair, env)
bech32Decoded, err := addressPairToBech32(addressPair, env)
if err != nil {
return engine.Error(fmt.Errorf("bech32_address/2: %w", err))
}
Expand All @@ -59,7 +59,7 @@ func Bech32Address(vm *engine.VM, address, bech32 engine.Term, cont engine.Cont,
})
}

func AddressPairToBech32(addressPair engine.Compound, env *engine.Env) (string, error) {
func addressPairToBech32(addressPair engine.Compound, env *engine.Env) (string, error) {
if addressPair.Functor() != AtomPair || addressPair.Arity() != 2 {
return "", fmt.Errorf("address should be a Pair '-(Hrp, Address)'")
}
Expand Down

0 comments on commit c31ba77

Please sign in to comment.