diff --git a/x/oracle/keeper/native_token.go b/x/oracle/keeper/native_token.go index b9a9c67a6..8ae5a6d87 100644 --- a/x/oracle/keeper/native_token.go +++ b/x/oracle/keeper/native_token.go @@ -152,7 +152,7 @@ func (k Keeper) GetAllStakerListAssets(ctx sdk.Context) (ret []types.StakerListA func (k Keeper) UpdateNSTValidatorListForStaker(ctx sdk.Context, assetID, stakerAddr, validatorPubkey string, amount sdkmath.Int) error { if !IsLimitedChangeNST(assetID) { - return types.ErrNSTAssetNotSurpported + return types.ErrNSTAssetNotSupported } _, decimalInt, err := k.getDecimal(ctx, assetID) if err != nil { @@ -259,7 +259,7 @@ func (k Keeper) UpdateNSTValidatorListForStaker(ctx sdk.Context, assetID, staker // UpdateNSTByBalanceChange updates balance info for staker under native-restaking asset of assetID when its balance changed by slash/refund on the source chain (beacon chain for eth) func (k Keeper) UpdateNSTByBalanceChange(ctx sdk.Context, assetID string, rawData []byte, roundID uint64) error { if !IsLimitedChangeNST(assetID) { - return types.ErrNSTAssetNotSurpported + return types.ErrNSTAssetNotSupported } _, chainID, _ := assetstypes.ParseID(assetID) if len(rawData) < 32 { @@ -271,7 +271,7 @@ func (k Keeper) UpdateNSTByBalanceChange(ctx sdk.Context, assetID string, rawDat } stakerChanges, err := parseBalanceChangeCapped(rawData, sl) if err != nil { - return err + return fmt.Errorf("failed to parse balance changes: %w", err) } store := ctx.KVStore(k.storeKey) for _, stakerAddr := range sl.StakerAddrs { diff --git a/x/oracle/types/errors.go b/x/oracle/types/errors.go index 5b85f1381..79598e6aa 100644 --- a/x/oracle/types/errors.go +++ b/x/oracle/types/errors.go @@ -26,5 +26,5 @@ var ( ErrGetPriceAssetNotFound = sdkerrors.Register(ModuleName, getPriceFailedAssetNotFound, "get price failed for asset not found") ErrGetPriceRoundNotFound = sdkerrors.Register(ModuleName, getPriceFailedRoundNotFound, "get price failed for round not found") ErrUpdateNativeTokenVirtualPriceFail = sdkerrors.Register(ModuleName, updateNativeTokenVirtualPriceFail, "update native token balance change failed") - ErrNSTAssetNotSurpported = sdkerrors.Register(ModuleName, nstAssetNotSurpported, "nstAsset not supported") + ErrNSTAssetNotSupported = sdkerrors.Register(ModuleName, nstAssetNotSurpported, "nstAsset not supported") )