Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

solana-tokens panics on bad recipient #16489

Closed
CriesofCarrots opened this issue Apr 12, 2021 · 0 comments · Fixed by #33926
Closed

solana-tokens panics on bad recipient #16489

CriesofCarrots opened this issue Apr 12, 2021 · 0 comments · Fixed by #33926
Milestone

Comments

@CriesofCarrots
Copy link
Contributor

Problem

solana-tokens assumes that all recipient strings in the input-csv are parsable as Pubkeys, and panics if not.

let to = allocation.recipient.parse().unwrap();

let wallet_address = allocation.recipient.parse().unwrap();

Proposed Solution

Return an error when parsing fails. While it is correct for the distribution to be halted before any transfers occur, the panic does not identify the problem address. Consider building all the instructions and then returning errors identifying any/all addresses that fail to parse.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants