mass-payout.js (not batching?)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 64/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- api
Research direction
Start with quickstart-template/mass-payout.js at the referenced line and inspect sendMassPayout, especially the transfer.wait() call. Verify whether each transfer is awaited before the next is created; done means all transfers can be queued before their statuses are checked, with the intended completion or failure output preserved.
Written by the indexing model from the issue text.
Description
Question, in function sendMassPayout... the await transfer.wait() call, wouldn't this make the code not batch and wait for each transfer to complete?
Should we skip this transfer.wait(); but store the "pending transfers" in an array and then check their status later?
something like this:
const transfers = [];
// STEP 1: Queue all transfers (sequentially to enable batching)
for (const address of recipients) {
const transfer = await wallet.createTransfer({
amount: transferAmount,
assetId: assetId,
destination: address,
});
transfers.push({ address, transfer });
console.log(`Queued transfer to ${address}`);
}
// STEP 2: Only after all are queued, check for status
for (const { address, transfer } of transfers) {
await transfer.wait(); // Now we can wait without blocking the next transfer
const status = transfer.getStatus();
if (status === 'complete') {
console.log(`Completed for ${address}`);
} else {
console.error(`Failed for ${address}`);
}
}
- Dominant language
- TypeScript
- Stars
- 123
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coinbase/coinbase-sdk-nodejs
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
coinbase/coinbase-sdk-nodejs#411 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 1/100
coinbase/coinbase-sdk-nodejs#410 ·
-
New Open
Difficulty 5/5 Over a week Newbie friendliness 5/100
coinbase/coinbase-sdk-nodejs#403 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 1/100
coinbase/coinbase-sdk-nodejs#400 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
coinbase/coinbase-sdk-nodejs#296 · 1 comment ·
All issues in coinbase/coinbase-sdk-nodejs
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100