use selected auction denom for payouts, not uCLR

master
michael 2022-09-14 21:41:58 +00:00
parent 6c8d4be6bc
commit 55e4da77c5
1 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ func (k msgServer) ClaimFunds(goCtx context.Context, msg *types.MsgClaimFunds) (
// check that auction has remaining funds to pay out // check that auction has remaining funds to pay out
if auction.Remaining == "0" { if auction.Remaining == "0" {
return nil, fmt.Errorf("auction %s has no payable CLR remaining", msg.AuctionId) return nil, fmt.Errorf("auction %s has no payable %s remaining", msg.AuctionId, auction.Denom)
} }
// check that sender is the selected provider for the auction // check that sender is the selected provider for the auction
@ -57,9 +57,9 @@ func (k msgServer) ClaimFunds(goCtx context.Context, msg *types.MsgClaimFunds) (
} }
// pay from module to user account // pay from module to user account
coins := sdk.NewCoins(sdk.NewCoin("uclr", sdk.NewIntFromBigInt(subAmt))) coins := sdk.NewCoins(sdk.NewCoin(auction.Denom, sdk.NewIntFromBigInt(subAmt)))
if err := k.bank.SendCoinsFromModuleToAccount(ctx, types.ModuleName, sendTo, coins); err != nil { if err := k.bank.SendCoinsFromModuleToAccount(ctx, types.ModuleName, sendTo, coins); err != nil {
return nil, fmt.Errorf("failed to send %s uCLR from module %s", subAmt.String(), types.ModuleName) return nil, fmt.Errorf("failed to send %s %s from module %s", subAmt.String(), auction.Denom, types.ModuleName)
} }
// subtract paid amount off of remaining payout tally & commit to chain state // subtract paid amount off of remaining payout tally & commit to chain state