Skip to content

Commit bf04db1

Browse files
authored
Merge pull request #154 from Tonomy-Foundation/hotfix/vesting-migrateacc
fix: ⚡ update the condition
2 parents 49730df + 01264ac commit bf04db1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

contracts/vesting.tmy/src/vesting.tmy.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,14 @@ namespace vestingtoken
218218

219219
for (auto iter = vesting_table.begin(); iter != vesting_table.end(); ++iter)
220220
{
221-
check(iter->tokens_allocated.symbol == SYSTEM_RESOURCE_CURRENCY_OLD, "Symbol has already been upgraded");
222-
223-
vesting_table.modify(iter, get_self(), [&](auto &row)
221+
if (iter->tokens_allocated.symbol == SYSTEM_RESOURCE_CURRENCY_OLD)
222+
{
223+
vesting_table.modify(iter, get_self(), [&](auto &row)
224224
{
225-
row.tokens_allocated = asset(row.tokens_allocated.amount, system_resource_currency);
226-
row.tokens_claimed = asset(row.tokens_claimed.amount, system_resource_currency);
227-
});
225+
row.tokens_allocated = asset(row.tokens_allocated.amount, system_resource_currency);
226+
row.tokens_claimed = asset(row.tokens_claimed.amount, system_resource_currency);
227+
});
228+
}
228229
}
229230
}
230231
}

0 commit comments

Comments
 (0)