@@ -119,11 +119,8 @@ export async function getLinear(contracts, address) {
119 const batch = await linearSR.getBatch(contracts, address);
119 const batch = await linearSR.getBatch(contracts, address);
120 const { amount, withdrawn } = batch;
120 const { amount, withdrawn } = batch;
122− // Contract errors on withdrawing from a user that does not have any
125− ? Math.min(await linearSR.getWithdrawLimit(contracts, address), remaining)
122+ const limit = await linearSR.getWithdrawLimit(contracts, address);
126− : 0;
123+ const available = Math.min(limit - withdrawn, remaining);
128 const total = Math.min(amount, remaining);
125 const total = Math.min(amount, remaining);