Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/gateway/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const (
var (
ErrTwinIDMismatch = fmt.Errorf("twin id mismatch")
ErrContractNotReserved = fmt.Errorf("a name contract with the given name must be reserved first")
ErrInvalidContractState = fmt.Errorf("the name contract must be in Created state")
ErrInvalidContractState = fmt.Errorf("the name contract must be in Created or GracePeriod state")

_ pkg.Gateway = (*gatewayModule)(nil)
)
Expand Down Expand Up @@ -545,7 +545,7 @@ func (g *gatewayModule) validateNameContract(name string, twinID uint32) error {
} else if subErr.IsError() {
return subErr.Err
}
if !contract.State.IsCreated {
if !contract.State.IsCreated && !contract.State.IsGracePeriod {
return ErrInvalidContractState
}
if uint32(contract.TwinID) != twinID {
Expand Down
4 changes: 2 additions & 2 deletions pkg/gateway_light/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const (
var (
ErrTwinIDMismatch = fmt.Errorf("twin id mismatch")
ErrContractNotReserved = fmt.Errorf("a name contract with the given name must be reserved first")
ErrInvalidContractState = fmt.Errorf("the name contract must be in Created state")
ErrInvalidContractState = fmt.Errorf("the name contract must be in Created or GracePeriod state")

_ pkg.Gateway = (*gatewayModule)(nil)
)
Expand Down Expand Up @@ -556,7 +556,7 @@ func (g *gatewayModule) validateNameContract(name string, twinID uint32) error {
} else if subErr.IsError() {
return subErr.Err
}
if !contract.State.IsCreated {
if !contract.State.IsCreated && !contract.State.IsGracePeriod {
return ErrInvalidContractState
}
if uint32(contract.TwinID) != twinID {
Expand Down
Loading