From 835fc08feacdec1519faf9092b6703da71531f87 Mon Sep 17 00:00:00 2001 From: closeobserve Date: Fri, 19 Jul 2024 00:36:50 +0800 Subject: [PATCH] chore: fix some comments Signed-off-by: closeobserve --- SuiStake.md | 2 +- core/cosmos/account.go | 2 +- core/cosmos/address_util_test.go | 6 +++--- core/eth/account.go | 2 +- core/eth/chainManager.go | 2 +- core/eth/ethchain.go | 2 +- core/starknet/account.go | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/SuiStake.md b/SuiStake.md index 218b165..ee1675f 100644 --- a/SuiStake.md +++ b/SuiStake.md @@ -8,7 +8,7 @@ var state = chain.GetValidatorState() print(state.Epoch/TotalStaked/TotalRewards) print("validator list = ", state.Validators) -// show validator infomation. +// show validator information. var validator = state.Validators[idx] print(validator.Name/Address/ImageUrl/APY ....) ``` diff --git a/core/cosmos/account.go b/core/cosmos/account.go index f4f78aa..8f38056 100644 --- a/core/cosmos/account.go +++ b/core/cosmos/account.go @@ -67,7 +67,7 @@ func (a *Account) PrivateKeyHex() (string, error) { return hexTypes.HexEncodeToString(a.privKey.Bytes()), nil } -// Is deocde from address +// Is decode from address // @return publicKey data func (a *Account) PublicKey() []byte { return a.privKey.PubKey().Bytes() diff --git a/core/cosmos/address_util_test.go b/core/cosmos/address_util_test.go index 9353797..4a2a5d9 100644 --- a/core/cosmos/address_util_test.go +++ b/core/cosmos/address_util_test.go @@ -78,7 +78,7 @@ func TestPrivatePublicKeyDataAndStringTransform(t *testing.T) { if priKey.Equals(account.privKey) { t.Log("private key restore success!!") } else { - t.Fatal("private key resotre failured.") + t.Fatal("private key restore failured.") } t.Log("============================") @@ -90,7 +90,7 @@ func TestPrivatePublicKeyDataAndStringTransform(t *testing.T) { if pubKey.Equals(account.privKey.PubKey()) { t.Log("public key restore success!!") } else { - t.Fatal("public key resotre failured.") + t.Fatal("public key restore failured.") } t.Log("============================") @@ -99,6 +99,6 @@ func TestPrivatePublicKeyDataAndStringTransform(t *testing.T) { if accAddress.Equals(originAddress) { t.Log("address key restore success!!") } else { - t.Fatal("address key resotre failured.") + t.Fatal("address key restore failured.") } } diff --git a/core/eth/account.go b/core/eth/account.go index 7f41dda..d3e2a11 100644 --- a/core/eth/account.go +++ b/core/eth/account.go @@ -105,7 +105,7 @@ func (a *Account) PrivateKeyHex() (string, error) { return types.HexEncodeToString(bytes), nil } -// Is deocde from address +// Is decode from address // @return publicKey data func (a *Account) PublicKey() []byte { return crypto.FromECDSAPub(&a.privateKeyECDSA.PublicKey) diff --git a/core/eth/chainManager.go b/core/eth/chainManager.go index 885abcf..d309424 100644 --- a/core/eth/chainManager.go +++ b/core/eth/chainManager.go @@ -12,7 +12,7 @@ func GetConnection(rpcUrl string) (*EthChain, error) { return getConnectionWithTimeout(rpcUrl, 0) } -// @param timeout time unit millsecond, zero instead use default. +// @param timeout time unit millisecond, zero instead use default. func getConnectionWithTimeout(rpcUrl string, timeout int64) (*EthChain, error) { chain, ok := chainConnections[rpcUrl] if ok { diff --git a/core/eth/ethchain.go b/core/eth/ethchain.go index 84cb2c1..a0477ad 100644 --- a/core/eth/ethchain.go +++ b/core/eth/ethchain.go @@ -28,7 +28,7 @@ func (e *EthChain) CreateRemote(rpcUrl string) (chain *EthChain, err error) { return e.CreateRemoteWithTimeout(rpcUrl, 0) } -// @param timeout time unit millsecond. 0 means use chain's default: 60000ms. +// @param timeout time unit millisecond. 0 means use chain's default: 60000ms. func (e *EthChain) CreateRemoteWithTimeout(rpcUrl string, timeout int64) (chain *EthChain, err error) { defer base.CatchPanicAndMapToBasicError(&err) diff --git a/core/starknet/account.go b/core/starknet/account.go index 98ea15b..5679160 100644 --- a/core/starknet/account.go +++ b/core/starknet/account.go @@ -114,7 +114,7 @@ func (a *Account) PrivateKeyHex() (string, error) { return hexTypes.HexEncodeToString(a.privateKey.Bytes()), nil } -// Is deocde from address +// Is decode from address // @return publicKey data func (a *Account) PublicKey() []byte { pub, _, err := curve.Curve.PrivateToPoint(a.privateKey)