Skip to content

Commit 655802e

Browse files
committed
Fix ran usage so it is provided by voter rather than contract for rewards
1 parent 468aa5e commit 655802e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.husky/pre-commit

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
2+
. "$(dirname "$0")/_/husky.sh"
23

34
npx --no-install lint-staged
45

6+

contracts/tokelore/tokelore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ void tokelore::vote(name voter, uint64_t proposal_id, name vote, asset vote_powe
322322
auto reward_entry = rewards.find(voter.value);
323323

324324
if (reward_entry == rewards.end()) {
325-
rewards.emplace(get_self(), [&](voter_reward_info &r) {
325+
rewards.emplace(voter, [&](voter_reward_info &r) {
326326
r.voter = voter;
327327
r.vp_participating = vote_power.amount;
328328
r.reward_per_vp_paid = current_reward_globals.reward_per_vp_stored;

0 commit comments

Comments
 (0)