add network for bypass
This commit is contained in:
@ -30,10 +30,10 @@ type bypassWrapper struct {
|
||||
r *bypassRegistry
|
||||
}
|
||||
|
||||
func (w *bypassWrapper) Contains(ctx context.Context, addr string) bool {
|
||||
func (w *bypassWrapper) Contains(ctx context.Context, network, addr string, opts ...bypass.Option) bool {
|
||||
bp := w.r.get(w.name)
|
||||
if bp == nil {
|
||||
return false
|
||||
}
|
||||
return bp.Contains(ctx, addr)
|
||||
return bp.Contains(ctx, network, addr, opts...)
|
||||
}
|
||||
|
@ -55,10 +55,10 @@ func (w *chainWrapper) Metadata() metadata.Metadata {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *chainWrapper) Route(ctx context.Context, network, address string) chain.Route {
|
||||
func (w *chainWrapper) Route(ctx context.Context, network, address string, opts ...chain.RouteOption) chain.Route {
|
||||
v := w.r.get(w.name)
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
return v.Route(ctx, network, address)
|
||||
return v.Route(ctx, network, address, opts...)
|
||||
}
|
||||
|
Reference in New Issue
Block a user