From 32180363999be1e59c74e5f1bf23857b357b176b Mon Sep 17 00:00:00 2001 From: Oleg Lomaka Date: Mon, 29 Jan 2024 13:21:42 -0500 Subject: [PATCH] fix tests --- chain.go | 3 ++- did_test.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/chain.go b/chain.go index a2f84bf..ee938b3 100644 --- a/chain.go +++ b/chain.go @@ -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) } } diff --git a/did_test.go b/did_test.go index 260cb6c..8bf6ded 100644 --- a/did_test.go +++ b/did_test.go @@ -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",