on master help sign in
Return "nothing available" result if conditional SR returns null
b7fdddbFang
src/lib/starRelease.js+4
@@ -70,6 +70,10 @@ export async function getConditional(contracts, address) {
70 conditionalSR.getBatches(contracts, address),
70 conditionalSR.getBatches(contracts, address),
71 ]);
71 ]);
72
72
73+ if (commitment === null || batches === null) {
74+ return { total: 0, available: 0, withdrawn: 0, batchLimits: [] };
75+ }
76+
73 const { total } = commitment;
77 const { total } = commitment;
74 const withdrawLimits = await Promise.all(
78 const withdrawLimits = await Promise.all(
75 batches.map((_, idx) =>
79 batches.map((_, idx) =>