Repository navigation
fix issues - #36
Open
hundredark wants to merge 2 commits into
Open
fix issues#36hundredark wants to merge 2 commits into
hundredark wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Deployment retries can recreate an already-confirmed mint after notification failure, blocking recovery and repeatedly consuming transaction fees.
1 open issue
What changed in this PR
This PR hardens Solana request handling and asset icon fetching, and changes asset deployment failures from process-stopping errors to logged retries.
Changes:
- Return errors for invalid user app IDs and rent lookup failures.
- Restrict icon downloads to an approved HTTPS host, with timeout, size, and image-dimension limits.
- Extract per-asset deployment handling so failures are logged and processing continues.
| File | Description |
|---|---|
solana/solana.go |
Return mint rent lookup errors instead of panicking. |
solana/request.go |
Reject invalid user app IDs without panicking. |
solana/observer.go |
Isolate deployment errors and retry through the observer loop. |
solana/icon.go |
Restrict icon origins and bound download and decoding resources. |
Review effort: Balanced
Comment on lines
+103
to
+104
| func (c *Client) RPCGetConfirmedAsset(ctx context.Context, address string) (*Asset, error) { | ||
| return c.rpcGetAsset(ctx, address, rpc.CommitmentConfirmed) |
| } | ||
|
|
||
| func (node *Node) deployExternalAsset(ctx context.Context, a *store.ExternalAsset) error { | ||
| id, tx, asset, err := node.CreateMintTransaction(ctx, a.AssetId) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Handle invalid user request memos without panicking.
Restrict asset icon fetching to prevent SSRF and resource exhaustion.
Isolate asset deployment failures so processing can continue and retry later.