Skip to content

abix: add UnpackSingleTuple, migrate payments.go callers#18

Merged
parkan merged 2 commits into
masterfrom
chore/abix-tuple-unpack
May 3, 2026
Merged

abix: add UnpackSingleTuple, migrate payments.go callers#18
parkan merged 2 commits into
masterfrom
chore/abix-tuple-unpack

Conversation

@parkan
Copy link
Copy Markdown
Collaborator

@parkan parkan commented May 2, 2026

Extracts the unpackSingleTuple helper from spregistry into pkg/abix/UnpackSingleTuple and migrates the two contracts/payments.go sites (GetRail, GetRailsForPayerAndToken) that were using the same fragile inline anon-struct cast. Adds synthetic-payload tests to lock in the unpack path.

constants/resolve.go and internal/generate/addresses.go keep UnpackIntoInterface -- single primitive output, not affected by the bug -- with a one-line safety comment.

Test plan

  • go build ./...
  • go vet ./...
  • go test ./...

@parkan parkan closed this May 3, 2026
@parkan parkan reopened this May 3, 2026
…S1016)

CI flagged the literal-style copy at GetRailsForPayerAndToken's results
loop. getRailsForPayerAndTokenItem and RailInfoResult have identical
field names + types; struct tags don't affect Go's struct conversion
identity, so a direct conversion suffices.
@parkan parkan merged commit 40ae25e into master May 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant