augur
augur copied to clipboard
allow user to claim multiple winnings
(contract call wired up in UI)
claimTradingProceeds on packages/augur-core/src/contracts/para/WethWrapperForAMMExchange.sol
only takes in 1 market. Need it to take in multiple.
so that users can claim all ETH amm markets in one transaction
like convenience method on packages/augur-core/src/contracts/trading/AugurTrading.sol
function claimMarketsProceeds(IMarket[] calldata _markets, address _shareHolder, bytes32 _fingerprint) external returns (bool) {
for (uint256 i=0; i < _markets.length; i++) {
uint256[] memory _outcomeFees = shareToken.claimTradingProceeds(_markets[i], _shareHolder, _fingerprint);
IProfitLoss(registry['ProfitLoss']).recordClaim(_markets[i], _shareHolder, _outcomeFees);
}
return true;
}
One method to claim all markets passed in would be preferral, but it'll be fine to have 2 convenience claim winnings methods one for ETH and one for USDT.
@bthaile Should be deployed. The remaining work is on the UI side.