Skip to content

Commit

Permalink
typo, detailed error
Browse files Browse the repository at this point in the history
  • Loading branch information
leonz789 committed Oct 22, 2024
1 parent 6154207 commit 6bbffab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions x/oracle/keeper/native_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion x/oracle/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)

0 comments on commit 6bbffab

Please sign in to comment.