Skip to content

fix(nip47): add fee_skim_mloki and circle_wallet fields dropped by json.Unmarshal - #21

Merged
naliyi merged 1 commit into
mainfrom
fix/nip47-fee-skim-circle-wallet-fields
Sep 16, 2026
Merged

naliyi merged 1 commit into
mainfrom
fix/nip47-fee-skim-circle-wallet-fields

Conversation

@naliyi

@naliyi naliyi commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • nip47.GetInfoResult/PayInvoiceResult/PayKeysendResult/Transaction had no field to catch lokihub's circle_hub-only circle_wallet object or its fee_skim_mloki payment field — encoding/json silently drops unknown wire fields on Unmarshal, so every caller (cashctl's wallet get-info, decode --check) lost this data entirely.
  • Adds GetInfoResult.CircleWallet (new CircleWalletInfo type) and FeeSkimMloki on Transaction/PayInvoiceResult/PayKeysendResult, with round-trip tests guarding both the populated and absent cases.

Test plan

  • go build ./...
  • go test ./nip47/...

🤖 Generated with Claude Code

…on.Unmarshal

lokihub's get_info_controller.go sends a circle_hub-only `circle_wallet:
{available_mloki, max_exp_secs, fees_ppm, circle_policy}` object, and its
payResponse/Transaction both carry `fee_skim_mloki` for a circle_wallet
member's own outgoing payments -- neither had a matching field here, so
encoding/json silently dropped both on Unmarshal and every caller
(cashctl's `wallet get-info`, `decode --check`) saw them vanish.

Adds GetInfoResult.CircleWallet (new CircleWalletInfo type) and
FeeSkimMloki on Transaction/PayInvoiceResult/PayKeysendResult.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@naliyi
naliyi merged commit 4d75494 into main Sep 16, 2026
3 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