mirror of
https://github.com/status-im/status-go.git
synced 2025-01-10 22:56:40 +00:00
5bbfabde94
* [#ISSUE-1041] New debug_postconfirm endpoint * move debug service api inside shhext service
14 lines
304 B
Go
14 lines
304 B
Go
package services
|
|
|
|
import "github.com/ethereum/go-ethereum/rpc"
|
|
|
|
// APIByNamespace retrieve an api by its namespace or returns nil.
|
|
func APIByNamespace(apis []rpc.API, namespace string) interface{} {
|
|
for _, api := range apis {
|
|
if api.Namespace == namespace {
|
|
return api.Service
|
|
}
|
|
}
|
|
return nil
|
|
}
|