Align error message strings with what actually happened

This commit is contained in:
Alex Forshtat 2024-08-12 17:38:18 +02:00
parent e6b77cb38d
commit 478edd1a6a
2 changed files with 4 additions and 4 deletions

View file

@ -57,7 +57,7 @@ func abiDecodeAcceptAccount(input []byte) (*AcceptAccountData, error) {
if methodSelector == SigFailAccountMethodSig { if methodSelector == SigFailAccountMethodSig {
return nil, errors.New("account signature error") return nil, errors.New("account signature error")
} }
return nil, errors.New("account did not call the EntryPoint 'acceptAccount' callback") return nil, errors.New("account validation did call the EntryPoint but not the 'acceptAccount' callback")
} }
acceptAccountData := &AcceptAccountData{} acceptAccountData := &AcceptAccountData{}
err = jsonAbi.UnpackIntoInterface(acceptAccountData, "acceptAccount", input[4:]) err = jsonAbi.UnpackIntoInterface(acceptAccountData, "acceptAccount", input[4:])
@ -71,7 +71,7 @@ func abiDecodeAcceptPaymaster(input []byte) (*AcceptPaymasterData, error) {
} }
methodSelector := new(big.Int).SetBytes(input[:4]).Uint64() methodSelector := new(big.Int).SetBytes(input[:4]).Uint64()
if methodSelector != AcceptPaymasterMethodSig { if methodSelector != AcceptPaymasterMethodSig {
return nil, errors.New("paymaster did not call the EntryPoint 'acceptPaymaster' callback") return nil, errors.New("paymaster validation did call the EntryPoint but not the 'acceptPaymaster' callback")
} }
acceptPaymasterData := &AcceptPaymasterData{} acceptPaymasterData := &AcceptPaymasterData{}
err = jsonAbi.UnpackIntoInterface(acceptPaymasterData, "acceptPaymaster", input[4:]) err = jsonAbi.UnpackIntoInterface(acceptPaymasterData, "acceptPaymaster", input[4:])

View file

@ -471,7 +471,7 @@ func validateAccountEntryPointCall(epc *EntryPointCall) (*AcceptAccountData, err
return nil, epc.err return nil, epc.err
} }
if epc.Input == nil { if epc.Input == nil {
return nil, errors.New("account validation did not call the EntryPoint callback") return nil, errors.New("account validation did not call the EntryPoint 'acceptAccount' callback")
} }
if len(epc.Input) != 68 { if len(epc.Input) != 68 {
return nil, errors.New("invalid account return data length") return nil, errors.New("invalid account return data length")
@ -484,7 +484,7 @@ func validatePaymasterEntryPointCall(epc *EntryPointCall) (*AcceptPaymasterData,
return nil, epc.err return nil, epc.err
} }
if epc.Input == nil { if epc.Input == nil {
return nil, errors.New("paymaster validation did not call the EntryPoint callback") return nil, errors.New("paymaster validation did not call the EntryPoint 'acceptPaymaster' callback")
} }
if len(epc.Input) < 100 { if len(epc.Input) < 100 {