diff --git a/.husky/pre-commit b/.husky/pre-commit index e7d8540..5e7c7a8 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,6 @@ -#!/bin/sh +#!/usr/bin/env sh +. "$(dirname "$0")/_/husky.sh" npx --no-install lint-staged + diff --git a/contracts/tokelore/tokelore.cpp b/contracts/tokelore/tokelore.cpp index ee2f313..26a78b9 100644 --- a/contracts/tokelore/tokelore.cpp +++ b/contracts/tokelore/tokelore.cpp @@ -322,7 +322,7 @@ void tokelore::vote(name voter, uint64_t proposal_id, name vote, asset vote_powe auto reward_entry = rewards.find(voter.value); if (reward_entry == rewards.end()) { - rewards.emplace(get_self(), [&](voter_reward_info &r) { + rewards.emplace(voter, [&](voter_reward_info &r) { r.voter = voter; r.vp_participating = vote_power.amount; r.reward_per_vp_paid = current_reward_globals.reward_per_vp_stored;