Skip to content

Commit

Permalink
fix: Remove shadowd variable
Browse files Browse the repository at this point in the history
  • Loading branch information
red-0ne committed Dec 6, 2024
1 parent 0d5cd46 commit 9eaec6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/supplier/keeper/msg_server_stake_supplier.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ func (k msgServer) StakeSupplier(ctx context.Context, msg *suppliertypes.MsgStak

supplierStakingFee := k.GetParams(ctx).StakingFee

if err := k.transferSupplierStakeDiff(ctx, msgSignerAddress, supplierCurrentStake, *msg.Stake); err != nil {
if err = k.transferSupplierStakeDiff(ctx, msgSignerAddress, supplierCurrentStake, *msg.Stake); err != nil {
logger.Info(fmt.Sprintf("ERROR: could not transfer supplier stake difference due to %v", err))
return nil, status.Error(codes.Internal, err.Error())
}

// Deduct the staking fee from the supplier's account balance.
// This is called after the stake difference is transferred give the supplier
// the opportunity to have enough balance to pay the fee.
if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, msgSignerAddress, suppliertypes.ModuleName, sdk.NewCoins(*supplierStakingFee)); err != nil {
if err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, msgSignerAddress, suppliertypes.ModuleName, sdk.NewCoins(*supplierStakingFee)); err != nil {
logger.Info(fmt.Sprintf("ERROR: could not send %s coins from %q to %q module account due to %v", supplierStakingFee, msgSignerAddress, suppliertypes.ModuleName, err))
return nil, status.Error(codes.FailedPrecondition, err.Error())
}
Expand Down

0 comments on commit 9eaec6a

Please sign in to comment.