From 506f73fb19401218b20afeba8de7144c59692a22 Mon Sep 17 00:00:00 2001 From: AstaFrode Date: Fri, 24 Nov 2023 13:42:28 +0530 Subject: [PATCH] update events of bucket (#164) --- chain/event.go | 4 ++-- example/example.go | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chain/event.go b/chain/event.go index 58efe93..1096894 100644 --- a/chain/event.go +++ b/chain/event.go @@ -583,7 +583,7 @@ func (c *chainClient) RetrieveEvent_FileBank_CreateBucket(blockhash types.Hash) vf := reflect.ValueOf(v.Value) if vf.Len() > 0 { allValue := fmt.Sprintf("%v", vf.Index(0)) - if strings.Contains(v.Name, "AccountId32.acc") { + if strings.Contains(v.Name, "AccountId32.operator") { temp := strings.Split(allValue, "] ") puk := make([]byte, types.AccountIDLen) for _, v := range temp { @@ -630,7 +630,7 @@ func (c *chainClient) RetrieveEvent_FileBank_DeleteBucket(blockhash types.Hash) vf := reflect.ValueOf(v.Value) if vf.Len() > 0 { allValue := fmt.Sprintf("%v", vf.Index(0)) - if strings.Contains(v.Name, "AccountId32.acc") { + if strings.Contains(v.Name, "AccountId32.operator") { temp := strings.Split(allValue, "] ") puk := make([]byte, types.AccountIDLen) for _, v := range temp { diff --git a/example/example.go b/example/example.go index 4bc0e3f..6b9d6fd 100644 --- a/example/example.go +++ b/example/example.go @@ -26,6 +26,9 @@ import ( var MY_MNEMONIC = "bottom drive obey lake curtain smoke basket hold race lonely fit walk" var RPC_ADDRS = []string{ + //devnet + "wss://devnet-rpc.cess.cloud/ws/", + //testnet "wss://testnet-rpc0.cess.cloud/ws/", "wss://testnet-rpc1.cess.cloud/ws/", "wss://testnet-rpc2.cess.cloud/ws/",