Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
olomix committed Jan 29, 2024
1 parent 60c94a2 commit 3218036
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ func RegisterChainID(blockchain Blockchain, network NetworkID, chainID int) erro

for _, v := range chainIDs {
if v == ChainID(chainID) {
return fmt.Errorf(`can't register chain id %d for '%s' because it's already registered for another chain id`, chainID, k)
return fmt.Errorf(`can't register chain id %d for '%v:%v' because it's already registered for another chain id`,
chainID, k.blockchain, k.networkID)
}
}

Expand Down
4 changes: 2 additions & 2 deletions did_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,8 @@ func TestCustomDIDRegistration_Negative(t *testing.T) {
Network: Main,
NetworkFlag: 0b0001_0001,
},
opts: []RegistrationOptions{WithChainID(101), WithDIDMethodByte(0b10000000)},
err: "can't register chain id 101 for 'eth:main' because it's already registered for another chain id",
opts: []RegistrationOptions{WithChainID(137), WithDIDMethodByte(0b10000000)},
err: "can't register chain id 137 for 'eth:main' because it's already registered for another chain id",
},
{
Description: "register new network and chain with existing networkFlag for existing existing did method",
Expand Down

0 comments on commit 3218036

Please sign in to comment.