@bananapus/core-v6 0.0.69 → 0.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/foundry.toml +1 -1
- package/package.json +1 -1
- package/src/JBMultiTerminal.sol +10 -2
package/foundry.toml
CHANGED
package/package.json
CHANGED
package/src/JBMultiTerminal.sol
CHANGED
|
@@ -676,7 +676,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
676
676
|
returns (uint256 beneficiaryTokenCount)
|
|
677
677
|
{
|
|
678
678
|
// Get a reference to the beneficiary's balance before the payment.
|
|
679
|
-
uint256 beneficiaryBalanceBefore =
|
|
679
|
+
uint256 beneficiaryBalanceBefore = _totalBalanceOf({holder: beneficiary, projectId: projectId});
|
|
680
680
|
|
|
681
681
|
// Accept the funds.
|
|
682
682
|
uint256 acceptedAmount =
|
|
@@ -694,7 +694,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
694
694
|
});
|
|
695
695
|
|
|
696
696
|
// Get a reference to the beneficiary's balance after the payment.
|
|
697
|
-
uint256 beneficiaryBalanceAfter =
|
|
697
|
+
uint256 beneficiaryBalanceAfter = _totalBalanceOf({holder: beneficiary, projectId: projectId});
|
|
698
698
|
|
|
699
699
|
// Set the beneficiary token count.
|
|
700
700
|
if (beneficiaryBalanceAfter > beneficiaryBalanceBefore) {
|
|
@@ -2324,6 +2324,14 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
2324
2324
|
JBTokenAmount({token: token, decimals: context.decimals, currency: context.currency, value: value});
|
|
2325
2325
|
}
|
|
2326
2326
|
|
|
2327
|
+
/// @notice Returns a holder's total token balance for a project.
|
|
2328
|
+
/// @param holder The holder to get a balance for.
|
|
2329
|
+
/// @param projectId The ID of the project to get a balance for.
|
|
2330
|
+
/// @return balance The holder's total project token balance.
|
|
2331
|
+
function _totalBalanceOf(address holder, uint256 projectId) internal view returns (uint256 balance) {
|
|
2332
|
+
return TOKENS.totalBalanceOf({holder: holder, projectId: projectId});
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2327
2335
|
//*********************************************************************//
|
|
2328
2336
|
// -------------------------- private helpers ------------------------ //
|
|
2329
2337
|
//*********************************************************************//
|